package com.zf.yichat.controller.member;

import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.zf.yichat.config.utils.IPV6ToRegionConverter;
import com.zf.yichat.controller.BaseController;
import com.zf.yichat.dto.RcMessageSynchronizationDto;
import com.zf.yichat.dto.UserLoginLogDto;
import com.zf.yichat.dto.UserStg;
import com.zf.yichat.dto.response.IpDto;
import com.zf.yichat.dto.response.UserDto;
import com.zf.yichat.dto.response.UserIpDto;
import com.zf.yichat.im.mapper.RcGroupMembersMapper;
import com.zf.yichat.im.mapper.RcMessageSynchronizationMapper;
import com.zf.yichat.im.mapper.RcUsersMapper;
import com.zf.yichat.mapper.*;
import com.zf.yichat.model.*;
import com.zf.yichat.service.*;
import com.zf.yichat.utils.common.*;
import com.zf.yichat.utils.response.FsPage;
import com.zf.yichat.utils.response.FsResponse;
import com.zf.yichat.utils.response.FsResponseGen;
import com.zf.yichat.vo.AppConfigType;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.http.HttpResponse;
import org.hibernate.validator.internal.util.Contracts;
import org.lionsoul.ip2region.xdb.Searcher;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.security.MessageDigest;
import java.util.*;
import java.util.stream.Collectors;

/**
 * 一句话描述功能
 *
 * @author fengsong
 * @date create in 11:08 2019/7/9 2019
 */
@Controller
@RequestMapping("member")
@Slf4j
public class MemberController extends BaseController {


    @Resource
    private UserApiMapper userApiMapper;

    @Autowired
    private BalanceService balanceService;

    @Resource
    private UserMapper userMapper;

    @Autowired
    private SecurityService securityService;

    @Autowired
    private UserService userService;

    @Resource
    private RcUsersMapper rcUsersMapper;

    @Resource
    private UserLoginLogMapper userLoginLogMapper;

    @Autowired
    private FriendService friendService;

    @Autowired
    private AppConfigService appConfigService;

    @Resource
    private AppConfigMapper appConfigMapper;

    @Resource
    private UserIpMapper userIpMapper;

    @Resource
    private RcGroupMembersMapper groupMembersMapper;

    @Autowired
    private UserWithdrawMapper userWithdrawMapper;

    @Autowired
    private UserIntegralService userIntegralService;

    @Resource(name = "ip2region")
    private Searcher searcher;

    @Value("${st.api_uri}")
    private String apiUri;
    @Value("${st.im_uri}")
    private String imUri;

    // 融云服务配置项
    @Value("${rongcloud.key}")
    private String RONGCLOUD_KEY;
    @Value("${rongcloud.secret}")
    private String RONGCLOUD_SECRET;

    @Resource
    private RcMessageSynchronizationMapper messageSynchronizationMapper;

    @Resource
    private IPV6ToRegionMapper ipv6ToRegionMapper;

    @Autowired
    private IPV6ToRegionConverter ipv6ToRegionConverter;

    @Autowired
    private UserAnswerService userAnswerService;

    @Resource
    private StQuestionsMapper stQuestionsMapper;
    @Resource
    private StAnswersMapper stAnswersMapper;
    /**********************访问列表页面方法开始******************************/

    /**
     * 用户列表
     * @return
     */
    @RequestMapping("/list/index")
    public String index() {
        return "member/list/index";
    }


    /**
     * 用户列表-积分详情
     * @return
     */
    @RequestMapping("/list/integralDetails")
    public String integralDetails(Long userId) {
        getRequest().setAttribute("userId", userId);
        return "member/list/integralDetails";
    }

    /**
     * 用户详情
     * @return
     */
    @RequestMapping("/list/details")
    public String details(Long userId) {

        UserDto userDto = new UserDto();
        User user = userService.selectById(userId);
        BeanUtils.copyProperties(user, userDto);

        if (null != user) {
            // 查询用户注册时的IP和地区
            com.zf.yichat.dto.UserIpDto userIpDto = userIpMapper.selectRegisterIpList(userId);
            String area = "";
            String userIp = "";
            if (null != userIpDto) {
                area = userIpDto.getArea();
                userIp = userIpDto.getIp();
            }
            userDto.setIpArea(area);
            userDto.setUserIp(userIp);
        }

        // 查询好友人数
        Integer friendCount = friendService.selectCountFriend(userId);
        getRequest().setAttribute("friendCount", friendCount);
        // 查询用户所在群组数量
        List<RcGroups> rcGroups = groupMembersMapper.queryGroupByMemberId(userId);
        getRequest().setAttribute("groupCount", rcGroups.size());
        // 查询当前用户登录次数
        Integer loginCount = userLoginLogMapper.queryLoginCountByUserId(userId);
        getRequest().setAttribute("loginCount", loginCount);

        getRequest().setAttribute("user", userDto);
        return "member/list/memberDetails";
    }

    /**
     * 用户群组详情
     * @return
     */
    @RequestMapping("/list/group")
    public String group(Long userId) {
        getRequest().setAttribute("userId", userId);
        return "member/list/group";
    }

    /**
     * 用户IP列表
     * @return
     */
    @RequestMapping("/ip/useripList")
    public String userIpList() {
        return "member/ip/useripList";
    }

    /**
     * 用户编辑保存页面
     * @return
     */
    @RequestMapping("save/index")
    public String saveIndex() {
        return "member/list/save";
    }

    /**
     * 用户注册登录统计页面
     * @return
     */
    @RequestMapping("regAndLogStatistic")
    public String registerAndLoginStatistic() {
        return "member/register/regAndLogStatistic";
    }

    /**
     * 用户聊天记录页面
     * @return
     */
    @RequestMapping("chatRecord/index")
    public String chatRecord(Long userId) {


        List<RcMessageSynchronizationDto> singleList = messageSynchronizationMapper.querySingleChatList(userId);
        // 查询用户单聊的对象列表
        getRequest().setAttribute("singleList", singleList);

        List<RcMessageSynchronizationDto> groupList = messageSynchronizationMapper.queryGroupChatList(userId);
        // 查询用户群聊的组列表
        getRequest().setAttribute("groupList", groupList);

        User user = userMapper.selectByPrimaryKey(userId);
        getRequest().setAttribute("user", user);
        return "member/chatrecord/index";
    }

    /**
     * 聊天记录详情页面
     * @param fromUserId
     * @param toUserId
     * @return
     */
    @RequestMapping("chatRecord/chatRecords")
    public String chatRecords(String fromUserId, String toUserId) {
        getRequest().setAttribute("fromUserId", fromUserId);
        getRequest().setAttribute("toUserId", toUserId);
        return "member/chatrecord/chatRecords";
    }

    /**
     * 用户资金列表
     * @return
     */
    @RequestMapping("memberFundList")
    public String memberFundList() {
        return "member/fund/memberFundList";
    }

    /**
     * 用户资金明细
     * @return
     */
    @RequestMapping("fundDetails")
    public String fundDetails(Long userId) {
        User user = userMapper.selectByPrimaryKey(userId);
        getRequest().setAttribute("user", user);
        return "member/fund/fundDetails";
    }

    /**
     * 用户推荐码上下级明细
     * @return
     */
    @RequestMapping("recommendCode")
    public String recommendCode() {
        return "member/recommendcode/index";
    }


    @RequestMapping("/clean/index")
    public String cleanIndex() {
        return "member/clean/index";
    }

    /**
     * 用户答题题目列表
     * @return
     */
    @RequestMapping("/question/index")
    public String questionIndex() {
        return "member/question/index";
    }

    /**
     * 用户答题题目-新增
     * @return
     */
    @RequestMapping("/question/add")
    public String questionAdd() {
        return "member/question/add";
    }

    /**
     * 用户答题题目-编辑
     * @return
     */
    @RequestMapping("/question/edit")
    public String questionEdit(Integer questionId) {
        StQuestions questions = stQuestionsMapper.selectByPrimaryKey(questionId);
        getRequest().setAttribute("questions", questions);
        return "member/question/edit";
    }

    /**
     * 用户答题题目列表
     * @return
     */
    @RequestMapping("/answer/index")
    public String answerIndex(Integer questionId) {
        getRequest().setAttribute("questionId", questionId);
        return "member/question/answer/index";
    }

    /**
     * 用户答题题目-新增
     * @return
     */
    @RequestMapping("/answer/add")
    public String answerAdd(Integer questionId) {
        getRequest().setAttribute("questionId", questionId);
        return "member/question/answer/add";
    }

    /**
     * 用户答题题目-编辑
     * @return
     */
    @RequestMapping("/answer/edit")
    public String answerEdit(Integer answerId) {
        StAnswers answers = stAnswersMapper.selectByPrimaryKey(answerId);
        getRequest().setAttribute("answers", answers);
        return "member/question/answer/edit";
    }

    /**********************访问列表页面方法结束******************************/


    /**
     * 用户答题列表
     * @param page
     * @param limit
     * @return
     */
    @RequestMapping("/questionList")
    @ResponseBody
    public FsResponse questionList(Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        return userAnswerService.questionList();
    }

    /**
     * 用户答题列表-答案列表
     * @param questionId
     * @return
     */
    @RequestMapping("/answerList")
    @ResponseBody
    public FsResponse answerList(Integer questionId) {
        return userAnswerService.answerList(questionId);
    }


    /**
     * 新增用户答题题目
     * @param questions
     * @return
     */
    @RequestMapping("/question/save")
    @ResponseBody
    public FsResponse save(StQuestions questions) {
        userAnswerService.addStQuestions(questions);
        return FsResponseGen.success();
    };

    /**
     * 编辑用户答题题目
     * @param questions
     * @return
     */
    @RequestMapping("/question/editQuestion")
    @ResponseBody
    public FsResponse edit(StQuestions questions) {
        userAnswerService.editStQuestions(questions);
        return FsResponseGen.success();
    };


    /**
     * 删除用户答题题目
     * @param id
     * @return
     */
    @RequestMapping("/question/delete")
    @ResponseBody
    public FsResponse delete(Integer id) {
        userAnswerService.deleteStQuestions(id);
        return FsResponseGen.success();
    };

    /**
     * 新增用户答题题目
     * @param answers
     * @return
     */
    @RequestMapping("/answer/save")
    @ResponseBody
    public FsResponse saveAnswer(StAnswers answers) {
        userAnswerService.addStAnswers(answers);
        return FsResponseGen.success();
    };

    /**
     * 编辑用户答题题目
     * @param answers
     * @return
     */
    @RequestMapping("/answer/editAnswer")
    @ResponseBody
    public FsResponse editAnswer(StAnswers answers) {
        userAnswerService.editStAnswers(answers);
        return FsResponseGen.success();
    };


    /**
     * 删除用户答题题目
     * @param id
     * @return
     */
    @RequestMapping("/answer/delete")
    @ResponseBody
    public FsResponse deleteAnswer(Integer id) {
        userAnswerService.deleteStAnswers(id);
        return FsResponseGen.success();
    };

    /**
     * 用户注册信息
     * @param page
     * @param limit
     * @param recommendCode
     * @return
     */
    @RequestMapping("/regAndLogStatistic/registerList")
    @ResponseBody
    public FsResponse registerList(Integer page, Integer limit, String recommendCode, String createTime) {
        Example example = new Example(User.class);
        Example.Criteria criteria = example.createCriteria();
        if (StringUtils.isNotBlank(recommendCode)) {
            criteria.andLike("recommendCode", "%" + recommendCode + "%");
        }
        if (StringUtils.isNotBlank(createTime)) {
            criteria.andEqualTo("ctime", createTime);
        }else {
            createTime = DateUtil.today();
            criteria.andEqualTo("ctime", createTime);
        }

        example.setOrderByClause("ctime desc");
        PageHelper.startPage(page, limit);

        // 查询注册类型的用户信息
        return DtoChangeUtils.getPageList(userApiMapper.queryRegisterUser("0",null, recommendCode, createTime), data-> {
            UserDto userDto = new UserDto();
            BeanUtils.copyProperties(data, userDto);
            String userIp = userDto.getUserIp();

            if(!"0:0:0:0:0:0:0:1".equals(userIp)) {
                try {
                    String area = searcher.search(userIp);
                    userDto.setIpArea(area);
                } catch (Exception e) {
                    log.info("获取IP失败！" + e.getMessage());
                }
            }
            return userDto;
        });
    }
    /**
     * 用户积分详情
     * @param page
     * @param limit
     * @return
     */
    @RequestMapping("/integralDetails")
    @ResponseBody
    public FsResponse registerList(Integer page, Integer limit, Long userId) {
        return userIntegralService.detailInfo(FsPage.init(page, limit), userId);
    }

    /**
     * 以IP分组查询所有数据
     * @param page
     * @param limit
     * @param userIp
     * @return
     */
    @RequestMapping("/ip/userIpList")
    @ResponseBody
    public FsResponse userIpList(Integer page, Integer limit, String userIp, String type) {

        Example example = new Example(UserIp.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("type", null == type ? 0 : type);
        if (StringUtils.isNotBlank(userIp)) {
            criteria.andEqualTo("ip", userIp);
        }

        example.setOrderByClause("ctime desc");
        PageHelper.startPage(page, limit);

        return DtoChangeUtils.getPageList(userApiMapper.selectUserIpList(userIp, type), data-> {
            UserIpDto userIpDto = new UserIpDto();
            BeanUtils.copyProperties(data, userIpDto);
            if(userIpDto.getIp()!=null){
                userIpDto.setIp("127.0.0.1");
            }
            String area = ipToArea(userIpDto.getIp());
            userIpDto.setArea(area);
            return userIpDto;
        });
    };


    /**
     * 查询用户推荐码上下级
     * @param recommendCode
     * @return
     */
    @RequestMapping("/recommendCodeList")
    @ResponseBody
    public FsResponse recommendCodeList(Integer page, Integer limit, String recommendCode) {
        Example example = new Example(User.class);
        Example.Criteria criteria = example.createCriteria().andEqualTo("status", 0);

        String paramRecommendCode = "";
        if (StringUtils.isNotBlank(recommendCode)) {
            criteria.andEqualTo("recommendCode", recommendCode);

            Example examples = new Example(User.class);
            examples.createCriteria().andEqualTo("ucode", recommendCode);
            User param = userMapper.selectOneByExample(examples);

            // 根据ucode查询父级的推荐码，在sql中直接使用
            if (null != param) {
                paramRecommendCode = param.getRecommendCode();
            }
        }

        PageHelper.startPage(page, limit);
        return DtoChangeUtils.getPageList(userMapper.queryUserSupAndSubByRecode(recommendCode, paramRecommendCode), data -> {
            UserStg user = new UserStg();
            BeanUtils.copyProperties(data, user);
            return user;
        });
    }

    /**
     * 查询用户列表
     * @param page
     * @param limit
     * @param name
     * @param groupStatus
     * @param validStatus
     * @param status 用户状态  0 正常  1 冻结
     * @param mobile
     * @param appid
     * @param ucode
     * @param background 0 真实用户  1 后台注册用户
     * @param authentication 0 未实名  1 已实名
     * @return
     */
    @RequestMapping("/list")
    @ResponseBody
    public FsResponse list(Integer page, Integer limit,Long userId, String name,String realName, Integer groupStatus,
                           Integer validStatus, Integer status, String mobile, String appid,
                           String ucode,String recommendCode, String background, String authentication,
                           String remark, String ctime, Integer level) {

        Example example = new Example(User.class);
        Example.Criteria criteria = example.createCriteria().andEqualTo("status", status == null ? 0 : status);
        if (null != userId) {
            criteria.andEqualTo("id", userId);
        }
        if (StringUtils.isNotBlank(name)) {
            criteria.andLike("nick", "%" + name + "%");
        }
        if (StringUtils.isNotBlank(realName)) {
            criteria.andLike("realName", "%" + realName + "%");
        }
        if (StringUtils.isNotBlank(mobile)) {
            criteria.andLike("mobile", "%" + mobile + "%");
        }
        if (StringUtils.isNotBlank(ucode)) {
            criteria.andLike("ucode", "%" + ucode + "%");
        }
        if (StringUtils.isNotBlank(recommendCode)) {
            criteria.andLike("recommendCode", "%" + recommendCode + "%");
        }
        if (StringUtils.isNotBlank(appid)) {
            criteria.andLike("appid", "%" + appid + "%");
        }
        if (StringUtils.isNotBlank(remark)) {
            criteria.andLike("remark", "%" + remark + "%");
        }

        if (Objects.nonNull(groupStatus)) {
            criteria.andEqualTo("createGroupAuth", groupStatus);
        }

        if (Objects.nonNull(validStatus)) {
            criteria.andIsNotNull("realName");
            criteria.andIsNotNull("idNumber");
        }
        if (Objects.nonNull(level)) {
            if (level == 0) {
                criteria.andCondition("(level is null or level = "+level+")");
            }else {
                criteria.andEqualTo("level", level);
            }
        }

        if (StringUtils.isNotBlank(background)) {
            if (background.equals("1")) {
                criteria.andCondition("id = id_number");
            }else {
                criteria.andCondition("(id_number is null or id != id_number)");
            }
        }

        if (StringUtils.isNotBlank(authentication)) {
            if (authentication.equals("0")) {
                criteria.andCondition("id_number IS NULL");
            }
            else {
                criteria.andCondition("id_number IS NOT NULL AND LENGTH(id_number) = 18");
            }
        }
        if (StringUtils.isNotBlank(ctime)) {
            criteria.andCondition("DATE_FORMAT(ctime,'%Y-%m-%d') = ", ctime);
        }

        example.setOrderByClause(" id desc");
        PageHelper.startPage(page, limit);

        return DtoChangeUtils.getPageList(userMapper.selectByExample(example), copy -> {
            UserDto dto = new UserDto();
            Long id = copy.getId();

            // 查询用户IP列表
            List<UserIpDto> userIps = userApiMapper.selectIpList(id);
            userIps.forEach(ipData -> {
                String area = ipToArea(ipData.getIp());
                ipData.setArea(area);
            });

            // 查询用户余额
            dto.setBanlance(balanceService.selectByUserId(copy.getId()).getIncomeBalance());
            dto.setIpList(userIps);
            dto.setId(id);

            try {
                dto.setUserIdStr(N3d.encode(copy.getId()));
            } catch (Exception e) {
            }
            dto.setNick(copy.getNick());
            dto.setAreaCode(copy.getAreaCode());
            dto.setMobile(copy.getMobile());
            dto.setPassword(copy.getPassword());
            dto.setSalt(copy.getSalt());
            dto.setToken(copy.getToken());
            dto.setAvatar(copy.getAvatar());
            dto.setPlatform(copy.getPlatform());
            dto.setStatus(copy.getStatus());
            dto.setAppid(copy.getAppid());
            dto.setGender(copy.getGender());
            dto.setUcode(copy.getUcode());

            dto.setTimestamp(copy.getTimestamp());
            dto.setLoginTime(copy.getLoginTime());
            dto.setCreateGroupAuth(copy.getCreateGroupAuth());
            dto.setQrcode(copy.getQrcode());
            dto.setCtime(copy.getCtime());
            dto.setUtime(copy.getUtime());
            dto.setRealName(copy.getRealName());
            dto.setIdNumber(copy.getIdNumber());
            dto.setRealStatus(copy.getRealStatus());
            dto.setRecommendCode(copy.getRecommendCode());
            dto.setRemark(copy.getRemark());
            dto.setIntegral(copy.getIntegral());
            dto.setLevel(copy.getLevel());
            return dto;
        });
    }

    /**
     * 用户资金明细列表
     * @param page
     * @param limit
     * @param userId
     * @param name
     * @return
     */
    @RequestMapping("/memberFundsList")
    @ResponseBody
    public FsResponse memberFundsList(Integer page, Integer limit,Long userId, String name, String mobile) {

        Example example = new Example(User.class);
        Example.Criteria criteria = example.createCriteria();
        if (null != userId) {
            criteria.andEqualTo("id", userId);
        }
        if (StringUtils.isNotBlank(name)) {
            criteria.andLike("nick", "%" + name + "%");
        }
        if (StringUtils.isNotBlank(mobile)) {
            criteria.andLike("mobile", "%" + mobile + "%");
        }

        example.setOrderByClause("id desc");
        PageHelper.startPage(page, limit);

        return DtoChangeUtils.getPageList(userMapper.selectByExample(example), copy -> {
            UserDto dto = new UserDto();
            Long id = copy.getId();

            // 查询用户余额
            dto.setBanlance(balanceService.selectByUserId(copy.getId()).getIncomeBalance());
            dto.setId(id);
            dto.setNick(copy.getNick());
            dto.setAvatar(copy.getAvatar());
            dto.setRealName(copy.getRealName());
            dto.setIdNumber(copy.getIdNumber());
            dto.setAppid(copy.getAppid());
            dto.setRemark(copy.getRemark());
            dto.setMobile(copy.getMobile());


//            dto.setAreaCode(copy.getAreaCode());
//            dto.setPassword(copy.getPassword());
//            dto.setSalt(copy.getSalt());
//            dto.setToken(copy.getToken());
//
//            dto.setPlatform(copy.getPlatform());
//            dto.setStatus(copy.getStatus());
//
//            dto.setGender(copy.getGender());
//            dto.setUcode(copy.getUcode());
//
//            dto.setTimestamp(copy.getTimestamp());
//            dto.setLoginTime(copy.getLoginTime());
//            dto.setCreateGroupAuth(copy.getCreateGroupAuth());
//            dto.setQrcode(copy.getQrcode());
//            dto.setCtime(copy.getCtime());
//            dto.setUtime(copy.getUtime());
//
//
//            dto.setRealStatus(copy.getRealStatus());
//            dto.setRecommendCode(copy.getRecommendCode());
            return dto;
        });
    }


    /**
     * 用户列表-查询登录次数和登录人数
     * @param days
     * @return
     */
    @RequestMapping("/queryUserLogin")
    @ResponseBody
    public FsResponse queryUserLogin(String days) {
        UserLoginLogDto loginLogDto = userLoginLogMapper.queryUserLogin(days);
        return FsResponseGen.successData(loginLogDto);
    }

    /**
     * 用户列表-查询注册人数
     * @param day
     * @return
     */
    @RequestMapping("/queryUserRegister")
    @ResponseBody
    public FsResponse queryUserRegister(String day) {

        UserLoginLogDto loginLogDto = userLoginLogMapper.queryUserRegister(day);
        return FsResponseGen.successData(loginLogDto);
    }

    /**
     * 用户列表-查询实名人数(idNumber不为空且位数为10位)
     * @return
     */
    @RequestMapping("/queryReal")
    @ResponseBody
    public FsResponse queryReal() {
        int realCount = userMapper.selectRealCount();
        return FsResponseGen.successData(realCount);
    }

    /**
     * 用户列表-根据ucode查询用户下级
     * @return
     */
    @RequestMapping("/queryLowerLevel")
    @ResponseBody
    public FsResponse queryLowerLevel(String ucode) {
        List<User> list = userMapper.queryLowerLevel(ucode);

        // 将 List<User> 转换成树形结构
        List<Map<String, Object>> treeData = new ArrayList<>();
        Map<Integer, Map<String, Object>> nodeMap = new HashMap<>();

        for (User user : list) {
            Integer id = Math.toIntExact(user.getId());
            String ucodeSel = user.getUcode();
            String title = id + "-" + user.getNick() + "-" + ucodeSel;

            Map<String, Object> node = new HashMap<>();
            node.put("title", title);
            node.put("id", id);

            treeData.add(node);

            // 根据ucode 再次查询, 如果有值继续上述操作 直到查不到下级为止
            buildTreeData(node, nodeMap, ucodeSel);

            // 将当前节点放入 nodeMap 中，供后续节点使用
            nodeMap.put(id, node);
        }

        return FsResponseGen.successData(treeData);
    }

    /**
     * 遍历获取下级
     * @param parentNode
     * @param nodeMap
     * @param ucode
     */
    private void buildTreeData(Map<String, Object> parentNode, Map<Integer, Map<String, Object>> nodeMap, String ucode) {
        List<User> list = userMapper.queryLowerLevel(ucode);

        if (list != null && !list.isEmpty()) {
            List<Map<String, Object>> children = new ArrayList<>();
            for (User user : list) {
                Integer id = Math.toIntExact(user.getId());
                String ucodeSel = user.getUcode();
                String title = id + "-" + user.getNick() + "-" + ucodeSel;

                Map<String, Object> node = new HashMap<>();
                node.put("title", title);
                node.put("id", id);

                children.add(node);

                // 递归查询下级节点，并将它们添加到当前节点的 children 属性中
                buildTreeData(node, nodeMap, ucodeSel);

                // 将当前节点放入 nodeMap 中，供后续节点使用
                nodeMap.put(id, node);
            }

            parentNode.put("children", children);
        }
    }


    @RequestMapping("/clean/list")
    @ResponseBody
    public FsResponse cleanList(Integer page, Integer limit, String balanceMoney, String notLoginDay, Long userId, String tel, String appId) {

        PageHelper.startPage(page, limit);
        return DtoChangeUtils.getPageList(userApiMapper.selectCleanList(NumberUtils.toInt(balanceMoney), NumberUtils.toInt(notLoginDay), userId, tel, appId), v -> v);
    }

    @RequestMapping("/clean/user")
    @ResponseBody
    public FsResponse cleanUser(String balanceMoney, String notLoginDay, Integer type, Long userId, String tel, String ids, String appId) {

        //删除全部
        if (type == 0) {
            List<Long> idList = userApiMapper.selectCleanList(NumberUtils.toInt(balanceMoney), NumberUtils.toInt(notLoginDay), userId, tel, appId).stream().map(User::getId).collect(Collectors.toList());
            userService.crashUser(idList);
        } else { //删除部分

            userService.crashUser(GeneralUtils.string2ListLong(ids));
        }

        return FsResponseGen.success();

    }

    /**
     * 用户冻结功能
     * @param id
     * @param status
     * @return
     */
    @RequestMapping("/status/update")
    @ResponseBody
    public FsResponse statusUpdate(Long id, Integer status) {

        // 冻结用户
        if (status == User.STATUS_1) {
            User user = new User();
            user.setId(id);
            user.setStatus(status);
            user.setToken("fsdfsdfsfsdfsdgsdgsdgsgwggs");
            // 更新用户状态
            userMapper.updateByPrimaryKeySelective(user);


            // 删除redis中的用户数据
            securityService.clearToken(id);
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("userId",id);
            jsonObject.put("verification_token", "239tNGUIJA@&#(nkgj93HFKUW9jfewtewnbu83w98FNSNUEIFCGDSOWEOEIW23N,|GFNDSLOJG");
            String result = OKHttpUtil.httpPostJson(imUri + "user/blockByAdmin", jsonObject.toJSONString());        // 删除融云中用户数据
            String result2= OKHttpUtil.httpPostJson(apiUri + "api/user/blockByAdmin", jsonObject.toJSONString());        // 删除融云中用户数据

            // 融云封禁用户
            this.blockRongYunUser(id);
            return FsResponseGen.successMsg("冻结成功！");
        }

        // 解冻用户
        User user = new User();
        user.setId(id);
        user.setStatus(status);
        // 更新用户状态
        userMapper.updateByPrimaryKeySelective(user);
        // 调用融云解封接口
        Integer code = this.unblockRongYunUser(id);
        if (200 == code) {
            return FsResponseGen.successMsg("解冻成功！");
        }
        return FsResponseGen.failMsg("解冻失败！");
    }

    /**
     * 一键解冻所有冻结用户
     * @return
     */
    @RequestMapping("/oneTouchUnFreezeAll")
    @ResponseBody
    public FsResponse oneTouchUnFreezeAll() {
        ArrayList<String> messageList = new ArrayList<>();
        List<User> freezeList = userService.queryAllFreezeUser();
        for (User user : freezeList) {
            Long userId = user.getId();
            // 解冻用户
            User updateUser = new User();
            updateUser.setId(userId);
            updateUser.setStatus(User.STATUS_0);
            // 更新用户状态
            userMapper.updateByPrimaryKeySelective(updateUser);
            // 调用融云解封接口
            Integer code = this.unblockRongYunUser(userId);
            if (200 != code) {
                messageList.add("解冻失败，userId: " + userId);
            }
        }
        return FsResponseGen.successData(messageList);
    }

    /**
     * 用户冻结功能-冻结所有下级
     * @param id
     * @param status
     * @return
     */
    @RequestMapping("/status/updateForLower")
    @ResponseBody
    public FsResponse statusUpdateForLower(Long id, Integer status, String lowerLevel) {

        User currentUser = userService.selectById(id);

        // 冻结用户
        if (status == User.STATUS_1) {
            User user = new User();
            user.setId(id);
            user.setStatus(status);
            user.setToken("fsdfsdfsfsdfsdgsdgsdgsgwggs");
            // 更新用户状态
            userMapper.updateByPrimaryKeySelective(user);


            // 删除redis中的用户数据
            securityService.clearToken(id);
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("userId",id);
            jsonObject.put("verification_token", "239tNGUIJA@&#(nkgj93HFKUW9jfewtewnbu83w98FNSNUEIFCGDSOWEOEIW23N,|GFNDSLOJG");
            String result = OKHttpUtil.httpPostJson(imUri + "user/blockByAdmin", jsonObject.toJSONString());        // 删除融云中用户数据
            String result2= OKHttpUtil.httpPostJson(apiUri + "api/user/blockByAdmin", jsonObject.toJSONString());        // 删除融云中用户数据

            // 融云封禁用户
            this.blockRongYunUser(id);

            // 冻结所有下级
            if ("0".equals(lowerLevel)) {
                String ucode = currentUser.getUcode();
                List<User> list = getAllLowerLevel(ucode);
                for (User u : list) {
                    Long uId = u.getId();

                    User userUpdate = new User();
                    userUpdate.setId(uId);
                    userUpdate.setStatus(status);
                    userUpdate.setToken("fsdfsdfsfsdfsdgsdgsdgsgwggs");
                    // 更新用户状态
                    userMapper.updateByPrimaryKeySelective(userUpdate);


                    // 删除redis中的用户数据
                    securityService.clearToken(uId);
                    JSONObject jsonObjectUpdate = new JSONObject();
                    jsonObjectUpdate.put("userId",uId);
                    jsonObjectUpdate.put("verification_token", "239tNGUIJA@&#(nkgj93HFKUW9jfewtewnbu83w98FNSNUEIFCGDSOWEOEIW23N,|GFNDSLOJG");
                    OKHttpUtil.httpPostJson(imUri + "user/blockByAdmin", jsonObjectUpdate.toJSONString());        // 删除融云中用户数据
                    OKHttpUtil.httpPostJson(apiUri + "api/user/blockByAdmin", jsonObjectUpdate.toJSONString());        // 删除融云中用户数据

                    // 融云封禁用户
                    this.blockRongYunUser(uId);
                }
            }
            return FsResponseGen.successMsg("冻结成功！");
        }

        // 解冻用户
        User user = new User();
        user.setId(id);
        user.setStatus(status);
        // 更新用户状态
        userMapper.updateByPrimaryKeySelective(user);
        // 调用融云解封接口
        Integer code = this.unblockRongYunUser(id);

        // 解冻所有下级
        if ("0".equals(lowerLevel)) {
            String ucode = currentUser.getUcode();
            List<User> list = getAllLowerLevel(ucode);
            for (User u : list) {
                Long uId = u.getId();

                // 解冻用户
                User userUnFreeze = new User();
                userUnFreeze.setId(uId);
                userUnFreeze.setStatus(status);
                // 更新用户状态
                userMapper.updateByPrimaryKeySelective(userUnFreeze);
                // 调用融云解封接口
                this.unblockRongYunUser(uId);
            }
        }

        if (200 == code) {
            return FsResponseGen.successMsg("解冻成功！");
        }
        return FsResponseGen.failMsg("解冻失败！");
    }

    public List<User> getAllLowerLevel (String ucode) {
        List<User> list = userMapper.queryLowerLevel (ucode);

        // 暂时只查用户下一级
//        List<User> allLowerLevel = new ArrayList<>();
//
//        for (User user : list) {
//            allLowerLevel.add (user);
//
//            // 根据 ucode 再次查询，如果有值继续上述操作 直到查不到下级为止
//            List<User> subLowerLevel = buildSubLowerLevel (ucode);
//            if (!subLowerLevel.isEmpty ()) {
//                allLowerLevel.addAll (subLowerLevel);
//            }
//        }

        return list;
    }

    private List<User> buildSubLowerLevel (String ucode) {
        List<User> list = userMapper.queryLowerLevel (ucode);
        List<User> subLowerLevel = new ArrayList<>();

        if (list != null && !list.isEmpty ()) {
            for (User user : list) {
                subLowerLevel.add (user);

                // 递归查询下级节点，并将它们添加到当前子级的列表中
                List<User> subSubLowerLevel = buildSubLowerLevel (user.getUcode ());
                if (!subSubLowerLevel.isEmpty ()) {
                    subLowerLevel.addAll (subSubLowerLevel);
                }
            }
        }

        return subLowerLevel;
    }
    /**
     * 用户冻结功能-读取excel
     * @return
     */
    @RequestMapping("/status/updateForExcel")
    @ResponseBody
    public void statusUpdateForExcel() {
        String ids = "351916," +
                "351919," +
                "351917," +
                "351907," +
                "351911," +
                "351915," +
                "351908," +
                "351906," +
                "351905," +
                "351900," +
                "351903," +
                "351904," +
                "351902," +
                "351899," +
                "351901," +
                "351897," +
                "351891," +
                "351895," +
                "351896," +
                "351894," +
                "351887," +
                "351885," +
                "351893," +
                "351890," +
                "351886," +
                "351889," +
                "351884," +
                "351882," +
                "351883," +
                "351881," +
                "351879," +
                "351880," +
                "351877," +
                "351878," +
                "351865," +
                "351875," +
                "351871," +
                "351874," +
                "351873," +
                "351872," +
                "351864," +
                "351870," +
                "351869," +
                "351866," +
                "351863," +
                "351862," +
                "351859," +
                "351861," +
                "351858," +
                "351856," +
                "351854," +
                "351855," +
                "351853," +
                "351852," +
                "351851," +
                "351850," +
                "351845," +
                "351848," +
                "351843," +
                "351844," +
                "351842," +
                "351841," +
                "351839," +
                "351838," +
                "351836," +
                "351822," +
                "351829," +
                "351827," +
                "351830," +
                "351828," +
                "351823," +
                "351818," +
                "351821," +
                "351819," +
                "351817," +
                "351814," +
                "351815," +
                "351811," +
                "351813," +
                "351810," +
                "351812," +
                "352297," +
                "352296," +
                "352294," +
                "352292," +
                "352291," +
                "352290," +
                "352283," +
                "352289," +
                "352286," +
                "352285," +
                "352288," +
                "352280," +
                "352282," +
                "352281," +
                "352279," +
                "352276," +
                "352273," +
                "352275," +
                "352268," +
                "352271," +
                "352270," +
                "352269," +
                "352265," +
                "352264," +
                "352266," +
                "352263," +
                "352261," +
                "352262," +
                "352259," +
                "352260," +
                "352257," +
                "352255," +
                "352258," +
                "352256," +
                "352254," +
                "352253," +
                "352251," +
                "352252," +
                "352250," +
                "352246," +
                "352248," +
                "352249," +
                "352244," +
                "352243," +
                "352245," +
                "352242," +
                "352241," +
                "352239," +
                "352238," +
                "352237," +
                "352234," +
                "352214," +
                "352230," +
                "352232," +
                "352228," +
                "352229," +
                "352213," +
                "352227," +
                "352216," +
                "352212," +
                "352219," +
                "352218," +
                "352210," +
                "352211," +
                "352209," +
                "352208," +
                "352206," +
                "352207," +
                "352204," +
                "352203," +
                "352202," +
                "352201," +
                "352200," +
                "352197," +
                "352198," +
                "352195," +
                "352194," +
                "352196," +
                "352192," +
                "352193," +
                "352190," +
                "352191," +
                "352189," +
                "352187," +
                "352188," +
                "352186," +
                "352185," +
                "352184," +
                "352183," +
                "352182," +
                "352180," +
                "352179," +
                "352181," +
                "352178," +
                "352177," +
                "352176," +
                "352175," +
                "352173," +
                "352172," +
                "352167," +
                "352165," +
                "352169," +
                "352166," +
                "352164," +
                "352163," +
                "352162," +
                "352161," +
                "352160," +
                "352158," +
                "352157," +
                "352156," +
                "352153," +
                "352151," +
                "352152," +
                "352155," +
                "352150," +
                "352148," +
                "352145," +
                "352147," +
                "352141," +
                "352146," +
                "352142," +
                "352144," +
                "352137," +
                "352140," +
                "352138," +
                "352135," +
                "352136," +
                "352133," +
                "352134," +
                "352132," +
                "352131," +
                "352125," +
                "352130," +
                "352129," +
                "352126," +
                "352127," +
                "352121," +
                "352124," +
                "352123," +
                "352118," +
                "352120," +
                "352119," +
                "352115," +
                "352117," +
                "352113," +
                "352114," +
                "352112," +
                "352111," +
                "352110," +
                "352109," +
                "352108," +
                "352106," +
                "352107," +
                "352104," +
                "352101," +
                "352105," +
                "352098," +
                "352099," +
                "352100," +
                "352095," +
                "352097," +
                "352096," +
                "352094," +
                "352091," +
                "352093," +
                "352088," +
                "352090," +
                "352086," +
                "352087," +
                "352085," +
                "352084," +
                "352081," +
                "352083," +
                "352079," +
                "352078," +
                "352077," +
                "352075," +
                "352076," +
                "352074," +
                "352071," +
                "352073," +
                "352072," +
                "352069," +
                "352070," +
                "352068," +
                "352066," +
                "352067," +
                "352065," +
                "352064," +
                "352063," +
                "352060," +
                "352062," +
                "352061," +
                "352057," +
                "352059," +
                "352058," +
                "352052," +
                "352055," +
                "352053," +
                "352050," +
                "352051," +
                "352046," +
                "352048," +
                "352045," +
                "352041," +
                "352043," +
                "352044," +
                "352040," +
                "352035," +
                "352042," +
                "352037," +
                "352036," +
                "352033," +
                "352034," +
                "352030," +
                "352028," +
                "352032," +
                "352031," +
                "352027," +
                "352025," +
                "352026," +
                "352024," +
                "352023," +
                "352021," +
                "352022," +
                "352020," +
                "352018," +
                "352019," +
                "352012," +
                "352017," +
                "352015," +
                "352010," +
                "352014," +
                "352013," +
                "351998," +
                "352006," +
                "352011," +
                "351995," +
                "351997," +
                "351996," +
                "351992," +
                "351993," +
                "351990," +
                "351986," +
                "351987," +
                "351985," +
                "351984," +
                "351981," +
                "351982," +
                "351979," +
                "351978," +
                "351980," +
                "351968," +
                "351974," +
                "351976," +
                "351973," +
                "351971," +
                "351972," +
                "351970," +
                "351969," +
                "351965," +
                "351963," +
                "351964," +
                "351961," +
                "351951," +
                "351960," +
                "351957," +
                "351958," +
                "351955," +
                "351956," +
                "351950," +
                "351953," +
                "351948," +
                "351947," +
                "351949," +
                "351944," +
                "351946," +
                "351943," +
                "351942," +
                "351945," +
                "351940," +
                "351939," +
                "351941," +
                "351938," +
                "351937," +
                "351936," +
                "351935," +
                "351933," +
                "351934," +
                "351932," +
                "351927," +
                "351931," +
                "351928," +
                "351923," +
                "351926," +
                "351925," +
                "351921," +
                "351922," +
                "351920," +
                "352712," +
                "352714," +
                "352713," +
                "352709," +
                "352710," +
                "352711," +
                "352705," +
                "352707," +
                "352703," +
                "352704," +
                "352702," +
                "352700," +
                "352701," +
                "352699," +
                "352696," +
                "352697," +
                "352695," +
                "352692," +
                "352694," +
                "352693," +
                "352691," +
                "352689," +
                "352690," +
                "352688," +
                "352684," +
                "352687," +
                "352686," +
                "352683," +
                "352685," +
                "352682," +
                "352681," +
                "352679," +
                "352678," +
                "352676," +
                "352675," +
                "352677," +
                "352673," +
                "352674," +
                "352670," +
                "352667," +
                "352672," +
                "352668," +
                "352665," +
                "352664," +
                "352663," +
                "352660," +
                "352659," +
                "352657," +
                "352658," +
                "352654," +
                "352655," +
                "352656," +
                "352652," +
                "352653," +
                "352651," +
                "352649," +
                "352648," +
                "352646," +
                "352647," +
                "352645," +
                "352643," +
                "352641," +
                "352635," +
                "352637," +
                "352630," +
                "352620," +
                "352629," +
                "352621," +
                "352615," +
                "352613," +
                "352588," +
                "352593," +
                "352614," +
                "352586," +
                "352584," +
                "352575," +
                "352578," +
                "352573," +
                "352559," +
                "352551," +
                "352556," +
                "352557," +
                "352554," +
                "352555," +
                "352552," +
                "352550," +
                "352547," +
                "352549," +
                "352545," +
                "352546," +
                "352531," +
                "352543," +
                "352541," +
                "352544," +
                "352542," +
                "352540," +
                "352538," +
                "352539," +
                "352537," +
                "352535," +
                "352532," +
                "352536," +
                "352528," +
                "352530," +
                "352527," +
                "352525," +
                "352526," +
                "352524," +
                "352523," +
                "352520," +
                "352522," +
                "352521," +
                "352515," +
                "352516," +
                "352517," +
                "352509," +
                "352506," +
                "352508," +
                "352510," +
                "352503," +
                "352507," +
                "352504," +
                "352502," +
                "352501," +
                "352500," +
                "352499," +
                "352497," +
                "352498," +
                "352495," +
                "352494," +
                "352493," +
                "352492," +
                "352490," +
                "352491," +
                "352489," +
                "352488," +
                "352486," +
                "352487," +
                "352484," +
                "352482," +
                "352485," +
                "352478," +
                "352480," +
                "352481," +
                "352477," +
                "352476," +
                "352473," +
                "352474," +
                "352471," +
                "352472," +
                "352468," +
                "352470," +
                "352469," +
                "352465," +
                "352467," +
                "352466," +
                "352461," +
                "352464," +
                "352462," +
                "352463," +
                "352460," +
                "352458," +
                "352459," +
                "352457," +
                "352455," +
                "352450," +
                "352454," +
                "352456," +
                "352449," +
                "352453," +
                "352448," +
                "352447," +
                "352445," +
                "352446," +
                "352443," +
                "352444," +
                "352442," +
                "352441," +
                "352440," +
                "352439," +
                "352438," +
                "352437," +
                "352436," +
                "352434," +
                "352435," +
                "352433," +
                "352430," +
                "352432," +
                "352428," +
                "352431," +
                "352429," +
                "352423," +
                "352427," +
                "352426," +
                "352418," +
                "352425," +
                "352424," +
                "352422," +
                "352421," +
                "352420," +
                "352417," +
                "352412," +
                "352416," +
                "352414," +
                "352415," +
                "352411," +
                "352406," +
                "352410," +
                "352413," +
                "352407," +
                "352408," +
                "352405," +
                "352404," +
                "352402," +
                "352403," +
                "352400," +
                "352401," +
                "352395," +
                "352399," +
                "352398," +
                "352397," +
                "352392," +
                "352396," +
                "352393," +
                "352391," +
                "352389," +
                "352385," +
                "352390," +
                "352388," +
                "352386," +
                "352387," +
                "352383," +
                "352384," +
                "352369," +
                "352381," +
                "352382," +
                "352379," +
                "352380," +
                "352377," +
                "352378," +
                "352372," +
                "352376," +
                "352375," +
                "352374," +
                "352371," +
                "352370," +
                "352368," +
                "352367," +
                "352366," +
                "352363," +
                "352362," +
                "352361," +
                "352360," +
                "352357," +
                "352359," +
                "352354," +
                "352355," +
                "352356," +
                "352352," +
                "352351," +
                "352349," +
                "352350," +
                "352347," +
                "352348," +
                "352345," +
                "352346," +
                "352341," +
                "352343," +
                "352344," +
                "352338," +
                "352340," +
                "352342," +
                "352336," +
                "352337," +
                "352334," +
                "352331," +
                "352333," +
                "352332," +
                "352330," +
                "352327," +
                "352326," +
                "352328," +
                "352318," +
                "352311," +
                "352323," +
                "352322," +
                "352321," +
                "352316," +
                "352314," +
                "352310," +
                "352313," +
                "352306," +
                "352307," +
                "352309," +
                "352305," +
                "352303," +
                "352299," +
                "352301," +
                "352302," +
                "352300," +
                "353074," +
                "353073," +
                "353076," +
                "353075," +
                "353068," +
                "353072," +
                "353071," +
                "353069," +
                "353070," +
                "353066," +
                "353057," +
                "353065," +
                "353063," +
                "353062," +
                "353060," +
                "353058," +
                "353059," +
                "353053," +
                "353055," +
                "353056," +
                "353049," +
                "353050," +
                "353052," +
                "353046," +
                "353031," +
                "353047," +
                "353045," +
                "353044," +
                "353043," +
                "353040," +
                "353041," +
                "353039," +
                "353038," +
                "353036," +
                "353035," +
                "353033," +
                "353034," +
                "353032," +
                "353030," +
                "353011," +
                "353029," +
                "353010," +
                "353008," +
                "353009," +
                "353004," +
                "353007," +
                "353005," +
                "353003," +
                "353001," +
                "353002," +
                "353000," +
                "352999," +
                "352994," +
                "352998," +
                "352997," +
                "352976," +
                "352993," +
                "352991," +
                "352992," +
                "352990," +
                "352989," +
                "352988," +
                "352987," +
                "352986," +
                "352985," +
                "352983," +
                "352984," +
                "352982," +
                "352981," +
                "352978," +
                "352980," +
                "352974," +
                "352975," +
                "352973," +
                "352972," +
                "352966," +
                "352967," +
                "352962," +
                "352964," +
                "352965," +
                "352960," +
                "352963," +
                "352953," +
                "352956," +
                "352957," +
                "352958," +
                "352955," +
                "352954," +
                "352950," +
                "352949," +
                "352948," +
                "352945," +
                "352947," +
                "352946," +
                "352943," +
                "352936," +
                "352944," +
                "352942," +
                "352941," +
                "352940," +
                "352939," +
                "352937," +
                "352935," +
                "352933," +
                "352932," +
                "352934," +
                "352929," +
                "352927," +
                "352930," +
                "352926," +
                "352924," +
                "352921," +
                "352925," +
                "352919," +
                "352923," +
                "352916," +
                "352920," +
                "352908," +
                "352918," +
                "352914," +
                "352917," +
                "352913," +
                "352915," +
                "352912," +
                "352910," +
                "352909," +
                "352911," +
                "352905," +
                "352906," +
                "352903," +
                "352901," +
                "352899," +
                "352900," +
                "352897," +
                "352898," +
                "352896," +
                "352895," +
                "352894," +
                "352893," +
                "352887," +
                "352892," +
                "352888," +
                "352891," +
                "352886," +
                "352885," +
                "352889," +
                "352884," +
                "352878," +
                "352883," +
                "352879," +
                "352882," +
                "352880," +
                "352874," +
                "352877," +
                "352876," +
                "352872," +
                "352875," +
                "352871," +
                "352870," +
                "352869," +
                "352867," +
                "352868," +
                "352865," +
                "352862," +
                "352864," +
                "352863," +
                "352860," +
                "352861," +
                "352856," +
                "352857," +
                "352859," +
                "352855," +
                "352854," +
                "352853," +
                "352851," +
                "352852," +
                "352850," +
                "352849," +
                "352846," +
                "352848," +
                "352845," +
                "352847," +
                "352842," +
                "352843," +
                "352844," +
                "352836," +
                "352841," +
                "352839," +
                "352840," +
                "352837," +
                "352834," +
                "352835," +
                "352832," +
                "352833," +
                "352830," +
                "352828," +
                "352831," +
                "352829," +
                "352827," +
                "352825," +
                "352824," +
                "352823," +
                "352808," +
                "352821," +
                "352819," +
                "352820," +
                "352817," +
                "352816," +
                "352818," +
                "352815," +
                "352811," +
                "352810," +
                "352809," +
                "352806," +
                "352804," +
                "352803," +
                "352807," +
                "352805," +
                "352801," +
                "352800," +
                "352802," +
                "352798," +
                "352799," +
                "352797," +
                "352795," +
                "352794," +
                "352796," +
                "352793," +
                "352792," +
                "352791," +
                "352789," +
                "352790," +
                "352787," +
                "352788," +
                "352786," +
                "352784," +
                "352785," +
                "352783," +
                "352780," +
                "352782," +
                "352781," +
                "352778," +
                "352779," +
                "352776," +
                "352775," +
                "352773," +
                "352777," +
                "352763," +
                "352770," +
                "352774," +
                "352768," +
                "352771," +
                "352769," +
                "352767," +
                "352766," +
                "352765," +
                "352764," +
                "352757," +
                "352749," +
                "352762," +
                "352761," +
                "352759," +
                "352760," +
                "352755," +
                "352758," +
                "352756," +
                "352753," +
                "352754," +
                "352750," +
                "352751," +
                "352748," +
                "352747," +
                "352746," +
                "352741," +
                "352745," +
                "352743," +
                "352736," +
                "352744," +
                "352740," +
                "352739," +
                "352738," +
                "352735," +
                "352734," +
                "352732," +
                "352733," +
                "352731," +
                "352728," +
                "352729," +
                "352730," +
                "352726," +
                "352723," +
                "352727," +
                "352722," +
                "352720," +
                "352716," +
                "352717," +
                "352721," +
                "352719," +
                "352715," +
                "352708," +
                "351916," +
                "357253," +
                "353220," +
                "353224," +
                "353215," +
                "353202," +
                "353196," +
                "353199," +
                "353203," +
                "353197," +
                "353194," +
                "353195," +
                "353193," +
                "353190," +
                "353191," +
                "353192," +
                "353188," +
                "353187," +
                "353189," +
                "353185," +
                "353186," +
                "353184," +
                "353181," +
                "353182," +
                "353183," +
                "353178," +
                "353179," +
                "353180," +
                "353177," +
                "353175," +
                "353173," +
                "353174," +
                "353171," +
                "353172," +
                "353170," +
                "353169," +
                "353166," +
                "353165," +
                "353167," +
                "353163," +
                "353164," +
                "353161," +
                "353154," +
                "353162," +
                "353155," +
                "353160," +
                "353159," +
                "353157," +
                "353158," +
                "353156," +
                "353149," +
                "353153," +
                "353152," +
                "353150," +
                "353146," +
                "353144," +
                "353148," +
                "353143," +
                "353145," +
                "353140," +
                "353139," +
                "353138," +
                "353142," +
                "353137," +
                "353135," +
                "353132," +
                "353133," +
                "353134," +
                "353131," +
                "353130," +
                "353129," +
                "353128," +
                "353127," +
                "353126," +
                "353125," +
                "353123," +
                "353120," +
                "353122," +
                "353121," +
                "353119," +
                "353118," +
                "353117," +
                "353115," +
                "353114," +
                "353116," +
                "353113," +
                "353111," +
                "353101," +
                "353110," +
                "353109," +
                "353112," +
                "353108," +
                "353107," +
                "353106," +
                "353105," +
                "353104," +
                "353103," +
                "353102," +
                "353099," +
                "353097," +
                "353098," +
                "353096," +
                "353091," +
                "353095," +
                "353093," +
                "353094," +
                "353090," +
                "353087," +
                "353088," +
                "353089," +
                "353086," +
                "353082," +
                "353085," +
                "353083," +
                "353081," +
                "353079," +
                "353078," +
                "353064," +
                "352324," +
                "352171," +
                "352822," +
                "352632," +
                "352512," +
                "352514," +
                "352511," +
                "352959," +
                "354294," +
                "354326," +
                "354313," +
                "354175," +
                "354318," +
                "354287," +
                "354289," +
                "354290," +
                "354315," +
                "342292," +
                "356115," +
                "207767," +
                "356100," +
                "356003," +
                "356138," +
                "356088," +
                "356074," +
                "356090," +
                "356089," +
                "356110," +
                "356083," +
                "356087," +
                "356111," +
                "355970," +
                "356082," +
                "206942," +
                "356081," +
                "356119," +
                "208078," +
                "356046," +
                "356096," +
                "356091," +
                "356084," +
                "356071," +
                "356014," +
                "356008," +
                "356044," +
                "356093," +
                "356038," +
                "356069," +
                "356048," +
                "356072," +
                "356078," +
                "356029," +
                "356019," +
                "356020," +
                "356007," +
                "355928," +
                "356041," +
                "356067," +
                "355966," +
                "356024," +
                "207054," +
                "356025," +
                "207978," +
                "356036," +
                "356037," +
                "355992," +
                "356045," +
                "356017," +
                "355998," +
                "356031," +
                "356010," +
                "355999," +
                "356011," +
                "356005," +
                "356012," +
                "355856," +
                "356022," +
                "355991," +
                "355939," +
                "355996," +
                "356023," +
                "355892," +
                "356004," +
                "355657," +
                "356015," +
                "356021," +
                "355951," +
                "355981," +
                "355989," +
                "355967," +
                "240993," +
                "355972," +
                "355938," +
                "355932," +
                "355985," +
                "355994," +
                "355947," +
                "355984," +
                "355965," +
                "355983," +
                "355908," +
                "355986," +
                "355982," +
                "355929," +
                "355971," +
                "355946," +
                "355735," +
                "355963," +
                "355847," +
                "355301," +
                "207285," +
                "355898," +
                "355979," +
                "355934," +
                "355925," +
                "355952," +
                "207548," +
                "355923," +
                "355956," +
                "355964," +
                "355902," +
                "355953," +
                "355837," +
                "207213," +
                "355944," +
                "355725," +
                "355848," +
                "355911," +
                "355936," +
                "355937," +
                "355719," +
                "355940," +
                "355933," +
                "355863," +
                "355603," +
                "355835," +
                "355712," +
                "355839," +
                "354420," +
                "355881," +
                "355916," +
                "355914," +
                "207523," +
                "349707," +
                "355924," +
                "355836," +
                "355780," +
                "355765," +
                "355901," +
                "355862," +
                "355770," +
                "355855," +
                "355868," +
                "207639," +
                "355870," +
                "355833," +
                "355854," +
                "355772," +
                "355786," +
                "355768," +
                "355866," +
                "355834," +
                "355852," +
                "355697," +
                "355511," +
                "355773," +
                "355648," +
                "355685," +
                "355840," +
                "355766," +
                "355784," +
                "355736," +
                "355846," +
                "355671," +
                "355752," +
                "355750," +
                "355683," +
                "355595," +
                "355727," +
                "355609," +
                "355625," +
                "355703," +
                "355740," +
                "355733," +
                "355732," +
                "355620," +
                "355739," +
                "355528," +
                "355717," +
                "355538," +
                "355502," +
                "355700," +
                "355698," +
                "207648," +
                "355711," +
                "355669," +
                "355688," +
                "355716," +
                "355707," +
                "355682," +
                "202802," +
                "355705," +
                "355637," +
                "355699," +
                "354360," +
                "355660," +
                "355680," +
                "355568," +
                "354381," +
                "355631," +
                "234495," +
                "354332," +
                "355661," +
                "355634," +
                "355618," +
                "355596," +
                "355665," +
                "355610," +
                "355562," +
                "208530," +
                "355612," +
                "355652," +
                "355569," +
                "208091," +
                "355623," +
                "355507," +
                "355588," +
                "355593," +
                "355550," +
                "354399," +
                "355517," +
                "355533," +
                "355516," +
                "355546," +
                "355536," +
                "355525," +
                "354361," +
                "355486," +
                "355530," +
                "354415," +
                "355549," +
                "355557," +
                "354370," +
                "355508," +
                "355574," +
                "206512," +
                "355555," +
                "349073," +
                "355541," +
                "355531," +
                "240170," +
                "354422," +
                "355495," +
                "354385," +
                "354424," +
                "355489," +
                "354425," +
                "355490," +
                "354324," +
                "355488," +
                "355519," +
                "205596," +
                "234443," +
                "354170," +
                "354418," +
                "355499," +
                "354343," +
                "354378," +
                "354384," +
                "354367," +
                "208458," +
                "206169," +
                "207011," +
                "349178," +
                "234521," +
                "337087," +
                "354414," +
                "354411," +
                "354400," +
                "354392," +
                "354417," +
                "354410," +
                "354416," +
                "354387," +
                "354407," +
                "202683," +
                "354409," +
                "354395," +
                "339522," +
                "354403," +
                "354358," +
                "354376," +
                "354354," +
                "354382," +
                "354372," +
                "354377," +
                "354364," +
                "354365," +
                "354363," +
                "354366," +
                "354347," +
                "354352," +
                "354351," +
                "354350," +
                "354337," +
                "354328," +
                "354345," +
                "354341," +
                "354339," +
                "354330," +
                "354340," +
                "354322," +
                "354325," +
                "354327," +
                "354317," +
                "354329," +
                "354320," +
                "339819," +
                "356669," +
                "356691," +
                "356650," +
                "356790," +
                "356745," +
                "356760," +
                "356819," +
                "356820," +
                "356808," +
                "339736," +
                "356838," +
                "356837," +
                "356799," +
                "349248," +
                "356839," +
                "356843," +
                "339817," +
                "356743," +
                "210566," +
                "356764," +
                "356726," +
                "356741," +
                "348882," +
                "356721," +
                "356785," +
                "356778," +
                "356727," +
                "337187," +
                "356631," +
                "356729," +
                "356750," +
                "356742," +
                "356724," +
                "356748," +
                "356783," +
                "356720," +
                "356622," +
                "356730," +
                "356728," +
                "356740," +
                "356735," +
                "356734," +
                "356744," +
                "315634," +
                "356681," +
                "356757," +
                "356680," +
                "356570," +
                "356683," +
                "339732," +
                "348890," +
                "356668," +
                "356597," +
                "356676," +
                "356737," +
                "356548," +
                "356654," +
                "356566," +
                "356421," +
                "356674," +
                "356660," +
                "356640," +
                "356618," +
                "356518," +
                "356632," +
                "356678," +
                "356616," +
                "335380," +
                "356671," +
                "356647," +
                "356628," +
                "356617," +
                "356602," +
                "356664," +
                "356659," +
                "356630," +
                "356641," +
                "335501," +
                "356661," +
                "356592," +
                "356636," +
                "356541," +
                "356562," +
                "356656," +
                "356595," +
                "327555," +
                "356633," +
                "356634," +
                "356551," +
                "315644," +
                "356646," +
                "356439," +
                "356534," +
                "356627," +
                "356626," +
                "356513," +
                "356498," +
                "356585," +
                "356625," +
                "356596," +
                "356522," +
                "356599," +
                "356629," +
                "356624," +
                "356594," +
                "356482," +
                "356612," +
                "356609," +
                "356536," +
                "356615," +
                "356605," +
                "356589," +
                "356588," +
                "348932," +
                "356490," +
                "356608," +
                "356604," +
                "356538," +
                "356493," +
                "356511," +
                "356508," +
                "356546," +
                "356417," +
                "356544," +
                "356565," +
                "356499," +
                "356289," +
                "356443," +
                "356553," +
                "356561," +
                "356385," +
                "356564," +
                "356416," +
                "356444," +
                "349778," +
                "356413," +
                "356483," +
                "356414," +
                "356438," +
                "356412," +
                "356489," +
                "356487," +
                "356360," +
                "356405," +
                "356408," +
                "356209," +
                "356367," +
                "356429," +
                "356365," +
                "356383," +
                "356430," +
                "356300," +
                "356330," +
                "356400," +
                "356428," +
                "356480," +
                "356410," +
                "356326," +
                "356406," +
                "356436," +
                "356401," +
                "356481," +
                "356263," +
                "356327," +
                "356381," +
                "356309," +
                "356387," +
                "356283," +
                "356344," +
                "356424," +
                "356217," +
                "356390," +
                "356358," +
                "356420," +
                "356415," +
                "356231," +
                "356202," +
                "356342," +
                "356316," +
                "356386," +
                "356376," +
                "356379," +
                "356384," +
                "356392," +
                "356166," +
                "356397," +
                "356398," +
                "356268," +
                "356171," +
                "356370," +
                "356248," +
                "356144," +
                "356290," +
                "356301," +
                "356262," +
                "356354," +
                "356201," +
                "356226," +
                "356352," +
                "356173," +
                "356351," +
                "356317," +
                "356339," +
                "356334," +
                "356319," +
                "356141," +
                "356296," +
                "356337," +
                "356292," +
                "356275," +
                "356341," +
                "356350," +
                "356336," +
                "356259," +
                "356320," +
                "356220," +
                "356242," +
                "356324," +
                "356276," +
                "356302," +
                "356249," +
                "356310," +
                "356311," +
                "356307," +
                "356269," +
                "356298," +
                "356273," +
                "356267," +
                "348943," +
                "356266," +
                "356294," +
                "356255," +
                "356288," +
                "356264," +
                "356146," +
                "356238," +
                "356278," +
                "356077," +
                "356250," +
                "356229," +
                "356193," +
                "356194," +
                "356272," +
                "356230," +
                "356212," +
                "356225," +
                "356239," +
                "356210," +
                "356200," +
                "356181," +
                "356206," +
                "356189," +
                "356204," +
                "356196," +
                "356219," +
                "356177," +
                "356211," +
                "356199," +
                "356092," +
                "355973," +
                "356191," +
                "207929," +
                "349295," +
                "356198," +
                "355890," +
                "356133," +
                "356102," +
                "356158," +
                "356101," +
                "356122," +
                "356164," +
                "356152," +
                "356168," +
                "356156," +
                "356169," +
                "356184," +
                "356178," +
                "356170," +
                "356161," +
                "356157," +
                "356050," +
                "356034," +
                "356052," +
                "356118," +
                "356125," +
                "356028," +
                "356129," +
                "349388," +
                "356134," +
                "356136," +
                "356139," +
                "356148," +
                "356126," +
                "356150," +
                "356086," +
                "207128," +
                "356117," +
                "356149," +
                "356104," +
                "349133," +
                "355402," +
                "355409," +
                "355432," +
                "206219," +
                "355418," +
                "355097," +
                "355340," +
                "355419," +
                "355349," +
                "355335," +
                "355438," +
                "355406," +
                "206697," +
                "355332," +
                "355403," +
                "208114," +
                "355291," +
                "337077," +
                "355290," +
                "355358," +
                "355416," +
                "355307," +
                "355361," +
                "355355," +
                "355420," +
                "355275," +
                "355317," +
                "355370," +
                "355304," +
                "355425," +
                "355383," +
                "355264," +
                "355368," +
                "355360," +
                "208232," +
                "355284," +
                "355387," +
                "355388," +
                "355384," +
                "355330," +
                "355345," +
                "355237," +
                "355338," +
                "355324," +
                "355380," +
                "355246," +
                "355241," +
                "355285," +
                "355230," +
                "355305," +
                "355341," +
                "355259," +
                "355314," +
                "355333," +
                "342532," +
                "355258," +
                "355282," +
                "355339," +
                "208597," +
                "355321," +
                "355249," +
                "355299," +
                "355328," +
                "205530," +
                "355322," +
                "355245," +
                "355309," +
                "207964," +
                "355293," +
                "355092," +
                "355294," +
                "355254," +
                "355296," +
                "355277," +
                "355226," +
                "355100," +
                "355276," +
                "355251," +
                "355257," +
                "355117," +
                "355260," +
                "355262," +
                "355228," +
                "355123," +
                "207359," +
                "355234," +
                "355196," +
                "355190," +
                "355250," +
                "355195," +
                "355171," +
                "355119," +
                "355186," +
                "355182," +
                "355247," +
                "336618," +
                "355261," +
                "207714," +
                "355244," +
                "355118," +
                "355239," +
                "355225," +
                "206882," +
                "355070," +
                "354866," +
                "355125," +
                "207906," +
                "355193," +
                "355120," +
                "355184," +
                "355108," +
                "355121," +
                "355107," +
                "355172," +
                "355109," +
                "355183," +
                "355102," +
                "355164," +
                "355192," +
                "355156," +
                "355176," +
                "207313," +
                "355154," +
                "355160," +
                "355124," +
                "355129," +
                "355110," +
                "355076," +
                "354892," +
                "206282," +
                "355145," +
                "206334," +
                "207261," +
                "355141," +
                "355122," +
                "207023," +
                "355105," +
                "355034," +
                "355078," +
                "355096," +
                "355075," +
                "355144," +
                "355089," +
                "355085," +
                "355098," +
                "355113," +
                "355112," +
                "355111," +
                "355114," +
                "355094," +
                "355029," +
                "355069," +
                "354998," +
                "204463," +
                "355064," +
                "339740," +
                "355082," +
                "355080," +
                "355032," +
                "207196," +
                "355091," +
                "355063," +
                "355072," +
                "355065," +
                "354885," +
                "355083," +
                "355088," +
                "354854," +
                "355071," +
                "355038," +
                "355018," +
                "355020," +
                "208221," +
                "355006," +
                "207159," +
                "355051," +
                "355017," +
                "207228," +
                "355013," +
                "355057," +
                "355058," +
                "355031," +
                "207180," +
                "208429," +
                "354839," +
                "355045," +
                "354833," +
                "207353," +
                "205586," +
                "355005," +
                "355059," +
                "355036," +
                "355015," +
                "354867," +
                "229042," +
                "355023," +
                "355027," +
                "355010," +
                "207462," +
                "355012," +
                "336143," +
                "205099," +
                "231258," +
                "354995," +
                "208005," +
                "354896," +
                "349359," +
                "339716," +
                "207843," +
                "354897," +
                "351768," +
                "354888," +
                "204432," +
                "354882," +
                "354898," +
                "354852," +
                "206108," +
                "354843," +
                "208049," +
                "354895," +
                "354857," +
                "354996," +
                "356871," +
                "354889," +
                "354886," +
                "354858," +
                "207123," +
                "354879," +
                "339707," +
                "354860," +
                "336208," +
                "356916," +
                "339718," +
                "354851," +
                "354862," +
                "354847," +
                "354840," +
                "354856," +
                "354869," +
                "354850," +
                "354841," +
                "354848," +
                "356812," +
                "356933," +
                "354836," +
                "336196," +
                "354827," +
                "354849," +
                "339695," +
                "339704," +
                "356888," +
                "356922," +
                "339743," +
                "339713," +
                "354834," +
                "356796," +
                "356900," +
                "354826," +
                "339699," +
                "336149," +
                "356759," +
                "354825," +
                "354823," +
                "356907," +
                "356913," +
                "356897," +
                "356769," +
                "356845," +
                "356648," +
                "339733," +
                "356725," +
                "339714," +
                "339840," +
                "339760," +
                "336168," +
                "356686," +
                "339710," +
                "339814," +
                "356860," +
                "356878," +
                "356869," +
                "356866," +
                "206126," +
                "356795," +
                "356738," +
                "356773," +
                "356847," +
                "356771," +
                "356835," +
                "348889," +
                "339821," +
                "356789," +
                "356842," +
                "356851," +
                "339842," +
                "206167," +
                "349589," +
                "206809," +
                "229237," +
                "255627," +
                "240903," +
                "349268," +
                "352640," +
                "208507," +
                "237340," +
                "349151," +
                "349521," +
                "207529," +
                "243534," +
                "229881," +
                "349460," +
                "349492," +
                "242187," +
                "209201," +
                "348964," +
                "206056," +
                "205039," +
                "208273," +
                "349611," +
                "352602," +
                "250188," +
                "243253," +
                "206312," +
                "207526," +
                "349633," +
                "208448," +
                "208374," +
                "352605," +
                "207153," +
                "349361," +
                "349659," +
                "207669," +
                "349734," +
                "352616," +
                "234608," +
                "243753," +
                "207864," +
                "207298," +
                "349269," +
                "206158," +
                "349107," +
                "206750," +
                "239865," +
                "207329," +
                "349482," +
                "237185," +
                "208242," +
                "206364," +
                "349732," +
                "352562," +
                "204460," +
                "349327," +
                "207339," +
                "348966," +
                "231771," +
                "240172," +
                "234394," +
                "349236," +
                "352592," +
                "208092," +
                "349510," +
                "349056," +
                "349045," +
                "203097," +
                "348977," +
                "231125," +
                "349511," +
                "208503," +
                "207753," +
                "206432," +
                "349519," +
                "205078," +
                "349518," +
                "349076," +
                "349431," +
                "349411," +
                "353209," +
                "352563," +
                "356574," +
                "355777," +
                "352600," +
                "353223," +
                "353225," +
                "352628," +
                "352636," +
                "355256," +
                "356834," +
                "356947," +
                "355422," +
                "356222," +
                "353228," +
                "339715," +
                "353218," +
                "352569," +
                "352567," +
                "355886," +
                "352587," +
                "352603," +
                "352642," +
                "352581," +
                "352565," +
                "352627," +
                "352617," +
                "352583," +
                "353210," +
                "353214," +
                "356895," +
                "353226," +
                "333333," +
                "355352," +
                "355428," +
                "355382," +
                "355323," +
                "255501," +
                "208556," +
                "355316," +
                "234400," +
                "205457," +
                "349483," +
                "208196," +
                "349182," +
                "208163," +
                "349474," +
                "349526," +
                "207426," +
                "207681," +
                "349394," +
                "207975," +
                "206210," +
                "207491," +
                "205075," +
                "239961," +
                "208480," +
                "349012," +
                "348985," +
                "206187," +
                "349421," +
                "241646," +
                "348981," +
                "349179," +
                "207322," +
                "349188," +
                "204046," +
                "349677," +
                "208016," +
                "239987," +
                "207924," +
                "207422," +
                "209400," +
                "234713," +
                "241351," +
                "207259," +
                "207583," +
                "348958," +
                "208082," +
                "208047," +
                "349439," +
                "207856," +
                "349424," +
                "234789," +
                "207002," +
                "349683," +
                "349562," +
                "234365," +
                "349434," +
                "349660," +
                "234797," +
                "206120," +
                "349004," +
                "231662," +
                "207487," +
                "208552," +
                "207321," +
                "349743," +
                "208551," +
                "349274," +
                "208371," +
                "207397," +
                "206325," +
                "237147," +
                "208608," +
                "349344," +
                "234823," +
                "348936," +
                "349477," +
                "349673," +
                "207439," +
                "355278," +
                "234801," +
                "204429," +
                "349192," +
                "349016," +
                "206100," +
                "349722," +
                "207077," +
                "208544," +
                "231677," +
                "231269," +
                "349225," +
                "204447," +
                "207475," +
                "348974," +
                "348934," +
                "207287," +
                "241073," +
                "208228," +
                "234941," +
                "207466," +
                "209221," +
                "204774," +
                "206076," +
                "205547," +
                "349498," +
                "229130," +
                "349516," +
                "348949," +
                "349569," +
                "349417," +
                "349727," +
                "349047," +
                "349006," +
                "353216," +
                "349316," +
                "349242," +
                "349186," +
                "349476," +
                "349613," +
                "234601," +
                "349714," +
                "348994," +
                "204436," +
                "348989," +
                "349094," +
                "349576," +
                "349730," +
                "349131," +
                "349017," +
                "349792," +
                "349335," +
                "349555," +
                "349541," +
                "207192," +
                "349322," +
                "349610," +
                "349000," +
                "205033," +
                "207294," +
                "349003," +
                "349547," +
                "208418," +
                "349026," +
                "349326," +
                "349218," +
                "245412," +
                "349447," +
                "349115," +
                "349057," +
                "203189," +
                "349788," +
                "349015," +
                "349072," +
                "348978," +
                "241136," +
                "224719," +
                "349262," +
                "207768," +
                "207341," +
                "349675," +
                "208127," +
                "349146," +
                "206038," +
                "349517," +
                "349093," +
                "204668," +
                "208194," +
                "349595," +
                "349209," +
                "349300," +
                "206019," +
                "224722," +
                "349059," +
                "207617," +
                "349055," +
                "208160," +
                "208172," +
                "238373," +
                "349486," +
                "239894," +
                "349735," +
                "349271," +
                "204449," +
                "349393," +
                "206161," +
                "349680," +
                "208543," +
                "206193," +
                "349143," +
                "246141," +
                "208602," +
                "348970," +
                "207223," +
                "246080," +
                "349176," +
                "349685," +
                "255352," +
                "349709," +
                "208557," +
                "240123," +
                "349150," +
                "205489," +
                "255280," +
                "349440," +
                "206351," +
                "348997," +
                "203834," +
                "231234," +
                "349041," +
                "349667," +
                "349160," +
                "349354," +
                "255568," +
                "349311," +
                "349306," +
                "356494," +
                "356528," +
                "349405," +
                "349164," +
                "349036," +
                "348856," +
                "349559," +
                "349284," +
                "349228," +
                "349719," +
                "349199," +
                "348944," +
                "348992," +
                "349203," +
                "349624," +
                "349563," +
                "349668," +
                "349037," +
                "349224," +
                "349279," +
                "349204," +
                "356388," +
                "348926," +
                "349790," +
                "348957," +
                "349663," +
                "255315," +
                "349485," +
                "349254," +
                "349255," +
                "349046," +
                "349293," +
                "349102," +
                "349106," +
                "349568," +
                "356433," +
                "349213," +
                "348947," +
                "349505," +
                "208214," +
                "349002," +
                "349797," +
                "349304," +
                "349435," +
                "349465," +
                "349545," +
                "349764," +
                "349765," +
                "348979," +
                "349466," +
                "349099," +
                "207903," +
                "349676," +
                "349637," +
                "207790," +
                "349058," +
                "349686," +
                "349539," +
                "206461," +
                "349121," +
                "349609," +
                "242211," +
                "349580," +
                "349340," +
                "349715," +
                "348929," +
                "349112," +
                "349266," +
                "349554," +
                "349169," +
                "349600," +
                "349032," +
                "349520," +
                "349767," +
                "349618," +
                "206246," +
                "349599," +
                "349441," +
                "349177," +
                "348928," +
                "349420," +
                "349314," +
                "349774," +
                "349582," +
                "207910," +
                "349389," +
                "349258," +
                "349444," +
                "349401," +
                "349623," +
                "207885," +
                "349187," +
                "349588," +
                "206447," +
                "349118," +
                "349024," +
                "206482," +
                "349372," +
                "349632," +
                "349657," +
                "348946," +
                "349433," +
                "349374," +
                "349551," +
                "349095," +
                "234889," +
                "349745," +
                "349205," +
                "208135," +
                "349720," +
                "234458," +
                "349682," +
                "349776," +
                "206985," +
                "349607," +
                "349497," +
                "349408," +
                "249889," +
                "349584," +
                "349331," +
                "349130," +
                "348924," +
                "349572," +
                "349423," +
                "349101," +
                "239896," +
                "240975," +
                "203825," +
                "204414," +
                "205699," +
                "202658," +
                "207493," +
                "205704," +
                "205705," +
                "336138," +
                "203142," +
                "205091," +
                "203125," +
                "349472," +
                "203194," +
                "203817," +
                "243708," +
                "349558," +
                "336164," +
                "336166," +
                "349277," +
                "336181," +
                "336142," +
                "343880," +
                "336176," +
                "336197," +
                "203140," +
                "348877," +
                "336198," +
                "336175," +
                "349605," +
                "349515," +
                "356849," +
                "230744," +
                "336136," +
                "356892," +
                "349750," +
                "325761," +
                "336205," +
                "349638," +
                "336188," +
                "336225," +
                "349379," +
                "349200," +
                "325758," +
                "349687," +
                "336148," +
                "349455," +
                "339746," +
                "349105," +
                "349027," +
                "234758," +
                "349330," +
                "349756," +
                "234687," +
                "239829," +
                "356722," +
                "349140," +
                "349469," +
                "349097," +
                "206229," +
                "349762," +
                "349488," +
                "348938," +
                "349530," +
                "349502," +
                "349265," +
                "349170," +
                "349191," +
                "349014," +
                "349590," +
                "349108," +
                "349042," +
                "349157," +
                "349644," +
                "348942," +
                "349117," +
                "349450," +
                "349231," +
                "349263," +
                "349549," +
                "349233," +
                "349062," +
                "349560," +
                "349144," +
                "349751," +
                "349063," +
                "349703," +
                "248986," +
                "349406," +
                "349748," +
                "349222," +
                "209399," +
                "349201," +
                "349615," +
                "349729," +
                "349391," +
                "349148," +
                "349019," +
                "349752," +
                "349162," +
                "349338," +
                "205064," +
                "349382," +
                "349616," +
                "349387," +
                "352564," +
                "349296," +
                "349537," +
                "205141," +
                "205607," +
                "203683," +
                "204787," +
                "204770," +
                "202676," +
                "328227," +
                "208922," +
                "207755," +
                "204569," +
                "204579," +
                "204109," +
                "329707," +
                "329157," +
                "204291," +
                "205708," +
                "208215," +
                "203183," +
                "205709," +
                "328081," +
                "206603," +
                "297330," +
                "329655," +
                "348238," +
                "348243," +
                "348228," +
                "348241," +
                "348240," +
                "348237," +
                "348236," +
                "348226," +
                "348195," +
                "348235," +
                "348232," +
                "348234," +
                "348229," +
                "348224," +
                "348231," +
                "348230," +
                "348227," +
                "348220," +
                "348177," +
                "348215," +
                "348225," +
                "348221," +
                "348217," +
                "348167," +
                "348216," +
                "348202," +
                "348212," +
                "348211," +
                "348208," +
                "348207," +
                "348206," +
                "348209," +
                "348204," +
                "348194," +
                "348203," +
                "348201," +
                "348193," +
                "348197," +
                "348200," +
                "348199," +
                "348198," +
                "348189," +
                "348196," +
                "348192," +
                "348187," +
                "348188," +
                "348191," +
                "348182," +
                "348186," +
                "348185," +
                "348179," +
                "348176," +
                "348183," +
                "348184," +
                "348178," +
                "348181," +
                "348131," +
                "348180," +
                "348170," +
                "348175," +
                "348171," +
                "348127," +
                "348168," +
                "348165," +
                "348169," +
                "348161," +
                "348163," +
                "348159," +
                "348158," +
                "348157," +
                "348160," +
                "348155," +
                "348152," +
                "348156," +
                "348153," +
                "348121," +
                "348154," +
                "348150," +
                "348151," +
                "348147," +
                "348146," +
                "348145," +
                "348148," +
                "348138," +
                "348149," +
                "348142," +
                "348136," +
                "348143," +
                "348139," +
                "348132," +
                "348141," +
                "348140," +
                "348137," +
                "348133," +
                "348134," +
                "348128," +
                "348115," +
                "348135," +
                "348110," +
                "348130," +
                "348120," +
                "348129," +
                "348125," +
                "348126," +
                "348122," +
                "348119," +
                "348124," +
                "348114," +
                "348118," +
                "348116," +
                "348117," +
                "348087," +
                "348095," +
                "348107," +
                "348113," +
                "348094," +
                "348104," +
                "348112," +
                "348108," +
                "348111," +
                "348105," +
                "348106," +
                "348103," +
                "348102," +
                "348099," +
                "348083," +
                "348100," +
                "348098," +
                "348097," +
                "348084," +
                "348101," +
                "348076," +
                "348089," +
                "348093," +
                "348086," +
                "348091," +
                "348088," +
                "348079," +
                "348080," +
                "348078," +
                "348060," +
                "348081," +
                "348082," +
                "348071," +
                "348073," +
                "348075," +
                "348063," +
                "348070," +
                "348068," +
                "348057," +
                "348067," +
                "348069," +
                "348059," +
                "348072," +
                "348037," +
                "348066," +
                "348065," +
                "348053," +
                "348051," +
                "348062," +
                "348064," +
                "348052," +
                "348058," +
                "348061," +
                "348042," +
                "348056," +
                "348050," +
                "348048," +
                "348038," +
                "348035," +
                "348046," +
                "348045," +
                "348040," +
                "348032," +
                "348036," +
                "348044," +
                "348033," +
                "347993," +
                "348043," +
                "348031," +
                "348029," +
                "348025," +
                "348034," +
                "348030," +
                "348024," +
                "348023," +
                "348014," +
                "348020," +
                "348013," +
                "348022," +
                "348026," +
                "348006," +
                "348018," +
                "348017," +
                "348021," +
                "348010," +
                "348016," +
                "348008," +
                "348012," +
                "348015," +
                "348004," +
                "348009," +
                "348011," +
                "347999," +
                "348005," +
                "348007," +
                "348003," +
                "347998," +
                "348000," +
                "347995," +
                "347990," +
                "347994," +
                "348002," +
                "347997," +
                "347986," +
                "348001," +
                "347996," +
                "347992," +
                "347984," +
                "347991," +
                "347974," +
                "347972," +
                "347987," +
                "347979," +
                "347983," +
                "347985," +
                "347989," +
                "347981," +
                "347932," +
                "347980," +
                "347977," +
                "347982," +
                "347975," +
                "347978," +
                "347926," +
                "347976," +
                "347964," +
                "347973," +
                "347970," +
                "347965," +
                "347971," +
                "347967," +
                "347966," +
                "347969," +
                "347962," +
                "347961," +
                "347968," +
                "347959," +
                "347958," +
                "347955," +
                "347960," +
                "347952," +
                "347951," +
                "347957," +
                "347956," +
                "347949," +
                "347950," +
                "347953," +
                "347954," +
                "347943," +
                "347948," +
                "347944," +
                "347939," +
                "347928," +
                "347946," +
                "347940," +
                "347947," +
                "347941," +
                "347938," +
                "347937," +
                "347934," +
                "347933," +
                "347929," +
                "347925," +
                "347936," +
                "347930," +
                "347907," +
                "347922," +
                "347923," +
                "347931," +
                "347921," +
                "347927," +
                "347924," +
                "347918," +
                "347913," +
                "347910," +
                "347909," +
                "347920," +
                "347916," +
                "347919," +
                "347917," +
                "344252," +
                "236498," +
                "202624," +
                "204373," +
                "204788," +
                "204780," +
                "328013," +
                "348588," +
                "348553," +
                "348581," +
                "348568," +
                "348583," +
                "348585," +
                "348589," +
                "348571," +
                "348577," +
                "348576," +
                "348573," +
                "348567," +
                "348578," +
                "348566," +
                "348569," +
                "348575," +
                "348580," +
                "348563," +
                "348574," +
                "348570," +
                "348561," +
                "348560," +
                "348546," +
                "348565," +
                "348564," +
                "348555," +
                "348531," +
                "348549," +
                "348559," +
                "348557," +
                "348556," +
                "348554," +
                "348551," +
                "348552," +
                "348545," +
                "348550," +
                "348538," +
                "348544," +
                "348541," +
                "348540," +
                "348532," +
                "348539," +
                "348535," +
                "348505," +
                "348537," +
                "348536," +
                "348534," +
                "348533," +
                "348530," +
                "348526," +
                "348521," +
                "348525," +
                "348522," +
                "348528," +
                "348529," +
                "348483," +
                "348523," +
                "348517," +
                "348519," +
                "348520," +
                "348524," +
                "348513," +
                "348509," +
                "348514," +
                "348515," +
                "348516," +
                "348512," +
                "348511," +
                "348508," +
                "348507," +
                "348506," +
                "348510," +
                "348503," +
                "348497," +
                "348499," +
                "348502," +
                "348465," +
                "348504," +
                "348496," +
                "348476," +
                "348500," +
                "348486," +
                "348490," +
                "348498," +
                "348494," +
                "348495," +
                "348493," +
                "348485," +
                "348482," +
                "348487," +
                "348491," +
                "348489," +
                "348462," +
                "348484," +
                "348469," +
                "348475," +
                "348478," +
                "348435," +
                "348481," +
                "348479," +
                "348480," +
                "348477," +
                "348472," +
                "348460," +
                "348474," +
                "348424," +
                "348473," +
                "348471," +
                "348470," +
                "348467," +
                "348466," +
                "348450," +
                "348468," +
                "348463," +
                "348464," +
                "348453," +
                "348448," +
                "348461," +
                "348455," +
                "348458," +
                "348451," +
                "348423," +
                "348454," +
                "348445," +
                "348436," +
                "348456," +
                "348452," +
                "348416," +
                "348446," +
                "348443," +
                "348433," +
                "348425," +
                "348438," +
                "348441," +
                "348437," +
                "348434," +
                "348440," +
                "348431," +
                "348419," +
                "348421," +
                "348428," +
                "348432," +
                "348430," +
                "348429," +
                "348427," +
                "348426," +
                "348422," +
                "348414," +
                "348417," +
                "348403," +
                "348420," +
                "348376," +
                "348413," +
                "348409," +
                "348361," +
                "348411," +
                "348408," +
                "348407," +
                "348406," +
                "348404," +
                "348410," +
                "348395," +
                "348398," +
                "348390," +
                "348405," +
                "348393," +
                "348399," +
                "348392," +
                "348401," +
                "348394," +
                "348384," +
                "348396," +
                "348389," +
                "348391," +
                "348386," +
                "348381," +
                "348382," +
                "348387," +
                "348375," +
                "348378," +
                "348379," +
                "348377," +
                "348374," +
                "348371," +
                "348366," +
                "348373," +
                "348370," +
                "348358," +
                "348362," +
                "348363," +
                "348367," +
                "348369," +
                "348356," +
                "348360," +
                "348368," +
                "348345," +
                "348364," +
                "348365," +
                "348357," +
                "348359," +
                "348351," +
                "348314," +
                "348354," +
                "348355," +
                "348344," +
                "348342," +
                "348353," +
                "348348," +
                "348347," +
                "348335," +
                "348349," +
                "348340," +
                "348331," +
                "348343," +
                "348321," +
                "348341," +
                "348338," +
                "348339," +
                "348334," +
                "348330," +
                "348333," +
                "348328," +
                "348323," +
                "348332," +
                "348295," +
                "348329," +
                "348326," +
                "348325," +
                "348327," +
                "348322," +
                "348320," +
                "348317," +
                "348316," +
                "348318," +
                "348312," +
                "348315," +
                "348313," +
                "348311," +
                "348302," +
                "348310," +
                "348305," +
                "348309," +
                "348301," +
                "348306," +
                "348269," +
                "348296," +
                "348304," +
                "348297," +
                "348307," +
                "348303," +
                "348298," +
                "348299," +
                "348281," +
                "348300," +
                "348245," +
                "348294," +
                "348282," +
                "348289," +
                "348290," +
                "348291," +
                "348292," +
                "348293," +
                "348286," +
                "348283," +
                "348287," +
                "348277," +
                "348266," +
                "348280," +
                "348276," +
                "348247," +
                "348272," +
                "348256," +
                "348275," +
                "348274," +
                "348271," +
                "348260," +
                "348273," +
                "348264," +
                "348267," +
                "348270," +
                "348259," +
                "348268," +
                "348265," +
                "348261," +
                "348263," +
                "348262," +
                "348254," +
                "348258," +
                "348252," +
                "348253," +
                "348255," +
                "348244," +
                "348257," +
                "348214," +
                "348222," +
                "348251," +
                "348250," +
                "348248," +
                "348249," +
                "348246," +
                "206138," +
                "207117," +
                "240059," +
                "328117," +
                "207204," +
                "205592," +
                "206413," +
                "207952," +
                "204435," +
                "207911," +
                "297380," +
                "329527," +
                "207650," +
                "206127," +
                "207361," +
                "208095," +
                "207349," +
                "239938," +
                "205608," +
                "329850," +
                "207164," +
                "206110," +
                "205110," +
                "207387," +
                "329400," +
                "207610," +
                "207431," +
                "207788," +
                "207661," +
                "237347," +
                "207831," +
                "207103," +
                "206089," +
                "229442," +
                "238093," +
                "207448," +
                "207695," +
                "207694," +
                "205598," +
                "206273," +
                "225711," +
                "208036," +
                "329005," +
                "207150," +
                "207515," +
                "225719," +
                "237835," +
                "206307," +
                "205405," +
                "205321," +
                "207642," +
                "208130," +
                "239885," +
                "206322," +
                "205054," +
                "205393," +
                "242192," +
                "207820," +
                "328429," +
                "242239," +
                "207357," +
                "207490," +
                "225805," +
                "206294," +
                "207280," +
                "206153," +
                "207019," +
                "207599," +
                "205344," +
                "207698," +
                "237895," +
                "207712," +
                "207547," +
                "206102," +
                "207302," +
                "221123," +
                "237800," +
                "205537," +
                "205323," +
                "255421," +
                "207144," +
                "206079," +
                "234761," +
                "207157," +
                "208012," +
                "238716," +
                "348718," +
                "348701," +
                "348700," +
                "348714," +
                "348708," +
                "348716," +
                "348707," +
                "348717," +
                "348715," +
                "348713," +
                "348711," +
                "348712," +
                "348710," +
                "348697," +
                "348709," +
                "348705," +
                "348671," +
                "348704," +
                "348693," +
                "348702," +
                "348703," +
                "348675," +
                "348699," +
                "348691," +
                "348686," +
                "348698," +
                "348688," +
                "348684," +
                "348694," +
                "348692," +
                "348696," +
                "348690," +
                "348689," +
                "348683," +
                "348682," +
                "348685," +
                "348677," +
                "348679," +
                "348678," +
                "348680," +
                "348674," +
                "348681," +
                "348658," +
                "348676," +
                "348637," +
                "348669," +
                "348663," +
                "348672," +
                "348673," +
                "348670," +
                "348668," +
                "348662," +
                "348664," +
                "348667," +
                "348666," +
                "348651," +
                "348653," +
                "348665," +
                "348647," +
                "348659," +
                "348643," +
                "348646," +
                "348654," +
                "348655," +
                "348622," +
                "348657," +
                "348656," +
                "348652," +
                "348642," +
                "348650," +
                "348649," +
                "348648," +
                "348641," +
                "348639," +
                "348632," +
                "348633," +
                "348640," +
                "348635," +
                "348629," +
                "348638," +
                "348630," +
                "348634," +
                "348624," +
                "348636," +
                "348627," +
                "348626," +
                "348614," +
                "348598," +
                "348618," +
                "348628," +
                "348604," +
                "348621," +
                "348620," +
                "348623," +
                "348612," +
                "348625," +
                "348619," +
                "348617," +
                "348613," +
                "348607," +
                "348611," +
                "348608," +
                "348602," +
                "348603," +
                "348610," +
                "348601," +
                "348605," +
                "348606," +
                "348584," +
                "348600," +
                "348587," +
                "348594," +
                "348596," +
                "348595," +
                "348562," +
                "348582," +
                "348591," +
                "348223," +
                "348027," +
                "348599," +
                "348548," +
                "348543," +
                "348449," +
                "348380," +
                "207207," +
                "207973," +
                "206140," +
                "207108," +
                "207220," +
                "206525," +
                "207818," +
                "205104," +
                "255418," +
                "205113," +
                "232390," +
                "229027," +
                "234869," +
                "236739," +
                "207869," +
                "208104," +
                "208026," +
                "208145," +
                "208022," +
                "206396," +
                "206309," +
                "234860," +
                "207692," +
                "240126," +
                "206726," +
                "207901," +
                "207556," +
                "207016," +
                "233712," +
                "206258," +
                "234637," +
                "206821," +
                "237302," +
                "206714," +
                "205295," +
                "234685," +
                "208408," +
                "204433," +
                "207027," +
                "207078," +
                "209241," +
                "206069," +
                "344751," +
                "242040," +
                "207453," +
                "207352," +
                "206116," +
                "207277," +
                "208441," +
                "240192," +
                "238766," +
                "239977," +
                "," +
                "225760," +
                "213334," +
                "205341," +
                "241060," +
                "239948," +
                "327952," +
                "327954," +
                "327951," +
                "327950," +
                "327949," +
                "327943," +
                "327941," +
                "327939," +
                "327938," +
                "327937," +
                "327935," +
                "327930," +
                "327933," +
                "327931," +
                "327928," +
                "327929," +
                "327926," +
                "327925," +
                "327923," +
                "327924," +
                "327922," +
                "327919," +
                "327921," +
                "327920," +
                "327916," +
                "327913," +
                "327912," +
                "327911," +
                "327910," +
                "327909," +
                "327852," +
                "327847," +
                "327845," +
                "327844," +
                "327842," +
                "327836," +
                "327838," +
                "327835," +
                "327834," +
                "327831," +
                "327830," +
                "327816," +
                "327811," +
                "327805," +
                "327810," +
                "327802," +
                "327801," +
                "327799," +
                "327798," +
                "327797," +
                "327791," +
                "327795," +
                "327789," +
                "327771," +
                "327785," +
                "327780," +
                "327718," +
                "327765," +
                "327766," +
                "327768," +
                "328030," +
                "328029," +
                "328027," +
                "328028," +
                "328024," +
                "328022," +
                "328021," +
                "328017," +
                "328020," +
                "328011," +
                "328010," +
                "328009," +
                "328006," +
                "328005," +
                "328004," +
                "328003," +
                "328002," +
                "328001," +
                "328000," +
                "327999," +
                "327997," +
                "327996," +
                "327995," +
                "327993," +
                "327994," +
                "327989," +
                "327992," +
                "327991," +
                "327988," +
                "327990," +
                "327987," +
                "327985," +
                "327986," +
                "327982," +
                "327980," +
                "327976," +
                "327979," +
                "327974," +
                "327973," +
                "327972," +
                "327967," +
                "327968," +
                "327971," +
                "327966," +
                "327965," +
                "327963," +
                "327958," +
                "327961," +
                "327956," +
                "206737," +
                "229006," +
                "208001," +
                "253153," +
                "208609," +
                "232386," +
                "202678," +
                "237991," +
                "205384," +
                "241193," +
                "207853," +
                "241234," +
                "208446," +
                "208604," +
                "207173," +
                "207406," +
                "240131," +
                "206166," +
                "239848," +
                "238138," +
                "208080," +
                "208164," +
                "234437," +
                "207105," +
                "208455," +
                "206540," +
                "206772," +
                "240167," +
                "239943," +
                "238073," +
                "207571," +
                "238729," +
                "234682," +
                "207004," +
                "237158," +
                "208351," +
                "237882," +
                "206715," +
                "241085," +
                "207158," +
                "208033," +
                "205589," +
                "202636," +
                "208202," +
                "208084," +
                "207303," +
                "250626," +
                "207224," +
                "207393," +
                "239914," +
                "207388," +
                "207569," +
                "206977," +
                "239910," +
                "206431," +
                "281463," +
                "206494," +
                "206171," +
                "206365," +
                "207416," +
                "231065," +
                "207253," +
                "255534," +
                "245798," +
                "206515," +
                "207759," +
                "207680," +
                "257539," +
                "207873," +
                "205316," +
                "207386," +
                "207012," +
                "207722," +
                "208249," +
                "208167," +
                "206952," +
                "207949," +
                "207499," +
                "231754," +
                "206189," +
                "207141," +
                "206034," +
                "203167," +
                "207876," +
                "207234," +
                "234777," +
                "281398," +
                "206955," +
                "208023," +
                "206111," +
                "208404," +
                "206999," +
                "208447," +
                "208131," +
                "207278," +
                "208467," +
                "207665," +
                "207082," +
                "207595," +
                "208451," +
                "208044," +
                "207854," +
                "207579," +
                "207121," +
                "205085," +
                "228262," +
                "205314," +
                "207745," +
                "208350," +
                "207870," +
                "231120," +
                "207171," +
                "207897," +
                "207271," +
                "206284," +
                "208471," +
                "207519," +
                "206531," +
                "242050," +
                "205511," +
                "237984," +
                "229298," +
                "207272," +
                "205470," +
                "207107," +
                "231710," +
                "248935," +
                "231653," +
                "207206," +
                "207938," +
                "207417," +
                "208536," +
                "241110," +
                "207221," +
                "237525," +
                "239799," +
                "231785," +
                "207846," +
                "208461," +
                "206049," +
                "255279," +
                "231639," +
                "207233," +
                "208009," +
                "208166," +
                "206101," +
                "207484," +
                "237854," +
                "206703," +
                "281351," +
                "209227," +
                "207488," +
                "207955," +
                "206954," +
                "207183," +
                "209401," +
                "264612," +
                "207390," +
                "207026," +
                "206392," +
                "207345," +
                "207842," +
                "229145," +
                "208140," +
                "207747," +
                "206974," +
                "208540," +
                "204532," +
                "205027," +
                "207829," +
                "206104," +
                "206962," +
                "234786," +
                "207570," +
                "234575," +
                "207376," +
                "243519," +
                "207993," +
                "207631," +
                "237178," +
                "205423," +
                "207301," +
                "255523," +
                "207479," +
                "209232," +
                "257513," +
                "202725," +
                "208590," +
                "208248," +
                "234904," +
                "206374," +
                "207574," +
                "206418," +
                "205346," +
                "208013," +
                "206875," +
                "208403," +
                "208423," +
                "206170," +
                "207705," +
                "228231," +
                "240186," +
                "205107," +
                "204182," +
                "234980," +
                "206940," +
                "231696," +
                "205593," +
                "234560," +
                "221089," +
                "207057," +
                "207483," +
                "206537," +
                "206291," +
                "207679," +
                "206131," +
                "206730," +
                "207085," +
                "207643," +
                "240085," +
                "207611," +
                "231031," +
                "207424," +
                "207927," +
                "241227," +
                "206489," +
                "207735," +
                "228309," +
                "224471," +
                "206088," +
                "206517," +
                "252795," +
                "207229," +
                "234689," +
                "206532," +
                "207931," +
                "207513," +
                "208492," +
                "207909," +
                "208496," +
                "207908," +
                "204438," +
                "255416," +
                "208244," +
                "207640," +
                "208211," +
                "208501," +
                "255514," +
                "208612," +
                "207122," +
                "231202," +
                "207807," +
                "225844," +
                "234492," +
                "208069," +
                "207746," +
                "240882," +
                "206360," +
                "207541," +
                "206400," +
                "229432," +
                "239922," +
                "207443," +
                "240008," +
                "205103," +
                "207407," +
                "208413," +
                "206873," +
                "205096," +
                "206992," +
                "281296," +
                "207948," +
                "205363," +
                "207013," +
                "207318," +
                "206216," +
                "209193," +
                "204542," +
                "207770," +
                "207496," +
                "242149," +
                "208059," +
                "207914," +
                "243988," +
                "207454," +
                "207371," +
                "207205," +
                "207461," +
                "207254," +
                "207125," +
                "206310," +
                "207958," +
                "208220," +
                "206188," +
                "235017," +
                "207786," +
                "208486," +
                "208483," +
                "207333," +
                "207989," +
                "281440," +
                "237744," +
                "207800," +
                "207029," +
                "250779," +
                "228425," +
                "207674," +
                "207182," +
                "241158," +
                "207565," +
                "207710," +
                "207015," +
                "207194," +
                "242154," +
                "207962," +
                "208074," +
                "229459," +
                "204452," +
                "207814," +
                "207389," +
                "207576," +
                "204450," +
                "240178," +
                "207559," +
                "241148," +
                "231214," +
                "207629," +
                "234684," +
                "207281," +
                "281387," +
                "207880," +
                "231732," +
                "207252," +
                "237121," +
                "238246," +
                "237319," +
                "208343," +
                "208614," +
                "231663," +
                "205550," +
                "240061," +
                "234488," +
                "206132," +
                "207460," +
                "207983," +
                "207247," +
                "207772," +
                "206341," +
                "208040," +
                "207905," +
                "208121," +
                "208589," +
                "231643," +
                "207441," +
                "208449," +
                "207985," +
                "237208," +
                "208571," +
                "231689," +
                "207838," +
                "208255," +
                "208412," +
                "206333," +
                "207690," +
                "207891," +
                "206130," +
                "208175," +
                "207941," +
                "206275," +
                "206519," +
                "205481," +
                "206528," +
                "238903," +
                "206345," +
                "234669," +
                "208203," +
                "208096," +
                "238360," +
                "231142," +
                "206987," +
                "241096," +
                "207734," +
                "208482," +
                "207844," +
                "207476," +
                "206523," +
                "208139," +
                "207041," +
                "208077," +
                "206016," +
                "206308," +
                "207445," +
                "207477," +
                "207801," +
                "207033," +
                "205403," +
                "231040," +
                "229658," +
                "207723," +
                "208527," +
                "207874," +
                "237903," +
                "251318," +
                "234448," +
                "206093," +
                "234806," +
                "208109," +
                "203135," +
                "208150," +
                "208007," +
                "207457," +
                "204439," +
                "207258," +
                "208200," +
                "207693," +
                "208099," +
                "231800," +
                "208538," +
                "208475," +
                "206993," +
                "207534," +
                "281191," +
                "208231," +
                "207304," +
                "281238," +
                "207115," +
                "206989," +
                "208616," +
                "241420," +
                "231123," +
                "237814," +
                "237791," +
                "205702," +
                "206706," +
                "208065," +
                "205518," +
                "239907," +
                "207334," +
                "206025," +
                "238106," +
                "231768," +
                "238243," +
                "229401," +
                "207706," +
                "231673," +
                "205326," +
                "237917," +
                "231684," +
                "241044," +
                "255430," +
                "231633," +
                "206262," +
                "231628," +
                "240212," +
                "254037," +
                "207098," +
                "261347," +
                "255545," +
                "206807," +
                "206854," +
                "205612," +
                "207368," +
                "208566," +
                "240147," +
                "207216," +
                "206701," +
                "205320," +
                "208119," +
                "255634," +
                "207068," +
                "208276," +
                "206446," +
                "231667," +
                "237959," +
                "255548," +
                "207614," +
                "231646," +
                "207806," +
                "207827," +
                "206967," +
                "207717," +
                "206782," +
                "205613," +
                "206311," +
                "208479," +
                "208421," +
                "206276," +
                "207151," +
                "207245," +
                "208509," +
                "206407," +
                "206704," +
                "206372," +
                "207143," +
                "206349," +
                "243640," +
                "207899," +
                "225662," +
                "207324," +
                "207501," +
                "207087," +
                "231753," +
                "275510," +
                "207132," +
                "238051," +
                "231642," +
                "204769," +
                "207508," +
                "207594," +
                "241317," +
                "208209," +
                "281422," +
                "238501," +
                "240176," +
                "281314," +
                "205566," +
                "281285," +
                "281253," +
                "281246," +
                "281211," +
                "281202," +
                "281166," +
                "282742," +
                "208246," +
                "206903," +
                "282874," +
                "207699," +
                "282669," +
                "282844," +
                "276553," +
                "275158," +
                "206338," +
                "275230," +
                "207907," +
                "234909," +
                "243796," +
                "207418," +
                "206968," +
                "207644," +
                "266819," +
                "206801," +
                "281219," +
                "229284," +
                "234620," +
                "206542," +
                "208118," +
                "207211," +
                "276602," +
                "237273," +
                "275400," +
                "202720," +
                "229890," +
                "207877," +
                "241164," +
                "257408," +
                "249699," +
                "207925," +
                "229827," +
                "267597," +
                "208066," +
                "207040," +
                "231741," +
                "282800," +
                "282718," +
                "282570," +
                "206389," +
                "282793," +
                "282587," +
                "276736," +
                "208134," +
                "275527," +
                "275345," +
                "276678," +
                "207961," +
                "275624," +
                "275410," +
                "269579," +
                "207067," +
                "259194," +
                "204466," +
                "265717," +
                "234841," +
                "265708," +
                "272457," +
                "265706," +
                "276817," +
                "207606," +
                "276407," +
                "238163," +
                "231136," +
                "276405," +
                "276807," +
                "206238," +
                "206448," +
                "276798," +
                "279617," +
                "276375," +
                "207636," +
                "276791," +
                "206850," +
                "208470," +
                "276753," +
                "239053," +
                "241367," +
                "239052," +
                "264942," +
                "207761," +
                "206295," +
                "264941," +
                "264937," +
                "264940," +
                "270239," +
                "264939," +
                "264936," +
                "231782," +
                "264938," +
                "264933," +
                "205422," +
                "264935," +
                "239824," +
                "264934," +
                "205066," +
                "264932," +
                "264931," +
                "231637," +
                "240810," +
                "263085," +
                "263084," +
                "231681," +
                "207474," +
                "263083," +
                "263078," +
                "206196," +
                "284283," +
                "206937," +
                "240750," +
                "205053," +
                "206305," +
                "206995," +
                "242184," +
                "207238," +
                "204431," +
                "234695," +
                "255196," +
                "237383," +
                "238119," +
                "206775," +
                "207732," +
                "207711," +
                "206462," +
                "237325," +
                "206752," +
                "208218," +
                "234818," +
                "205385," +
                "240828," +
                "206353," +
                "221154," +
                "207452," +
                "231805," +
                "234810," +
                "237453," +
                "239809," +
                "208406," +
                "207066," +
                "207383," +
                "240836," +
                "208019," +
                "207250," +
                "207440," +
                "208522," +
                "206427," +
                "206504," +
                "207036," +
                "208250," +
                "207657," +
                "229264," +
                "207600," +
                "207916," +
                "206509," +
                "208521," +
                "204714," +
                "207632," +
                "208391," +
                "207718," +
                "207379," +
                "206256," +
                "234822," +
                "241121," +
                "231738," +
                "207996," +
                "206109," +
                "241007," +
                "207824," +
                "203206," +
                "208142," +
                "207268," +
                "204717," +
                "206826," +
                "202596," +
                "206994," +
                "208116," +
                "202648," +
                "202628," +
                "205090," +
                "207273," +
                "207415," +
                "203133," +
                "205436," +
                "206487," +
                "204696," +
                "207779," +
                "205981," +
                "281263," +
                "203179," +
                "207821," +
                "205153," +
                "206749," +
                "207447," +
                "202240," +
                "203181," +
                "206382," +
                "237145," +
                "206124," +
                "218010," +
                "234392," +
                "208420," +
                "203113," +
                "238126," +
                "206965," +
                "228952," +
                "208055," +
                "231181," +
                "208520," +
                "206539," +
                "204179," +
                "207069," +
                "206253," +
                "205523," +
                "207449," +
                "208472," +
                "202718," +
                "240149," +
                "204288," +
                "208523," +
                "234702," +
                "239866," +
                "203905," +
                "207917," +
                "205070," +
                "207898," +
                "207414," +
                "270242," +
                "202722," +
                "239060," +
                "206506," +
                "206430," +
                "208508," +
                "203908," +
                "229528," +
                "207834," +
                "234756," +
                "231114," +
                "208454," +
                "240151," +
                "202602," +
                "206865," +
                "241084," +
                "240066," +
                "207423," +
                "204341," +
                "240584," +
                "202593," +
                "207778," +
                "202785," +
                "205700," +
                "208358," +
                "206209," +
                "203749," +
                "203229," +
                "207581," +
                "203678," +
                "206203," +
                "204688," +
                "206963," +
                "205546," +
                "204752," +
                "203208," +
                "202623," +
                "204649," +
                "204781," +
                "204561," +
                "214791," +
                "238717," +
                "207127," +
                "239137," +
                "205906," +
                "207561," +
                "207025," +
                "231705," +
                "205500," +
                "207050," +
                "207420," +
                "208124," +
                "204456," +
                "206032," +
                "207641," +
                "206535," +
                "204703," +
                "239496," +
                "208450," +
                "281274," +
                "208417," +
                "205989," +
                "207765," +
                "207465," +
                "255380," +
                "255639," +
                "234629," +
                "234512," +
                "234618," +
                "242127," +
                "240042," +
                "240169," +
                "234731," +
                "208073," +
                "257320," +
                "255308," +
                "238121," +
                "242071," +
                "231796," +
                "242169," +
                "205073," +
                "206520," +
                "208346," +
                "204462," +
                "207413," +
                "243582," +
                "207473," +
                "207980," +
                "206922," +
                "208365," +
                "243607," +
                "207509," +
                "231773," +
                "221151," +
                "231767," +
                "231765," +
                "231748," +
                "237154," +
                "207400," +
                "207147," +
                "207337," +
                "208042," +
                "243744," +
                "255278," +
                "205061," +
                "243736," +
                "255412," +
                "237857," +
                "230897," +
                "205089," +
                "207754," +
                "208500," +
                "214160," +
                "207791," +
                "234484," +
                "231744," +
                "231187," +
                "231728," +
                "230805," +
                "207926," +
                "239927," +
                "243544," +
                "231711," +
                "224492," +
                "207219," +
                "231692," +
                "234378," +
                "239966," +
                "326355," +
                "205412," +
                "237272," +
                "229378," +
                "205707," +
                "202617," +
                "267114," +
                "268927," +
                "237118," +
                "276392," +
                "261897," +
                "234404," +
                "244124," +
                "261896," +
                "250067," +
                "234405," +
                "238037," +
                "249775," +
                "234472," +
                "243880," +
                "246805," +
                "244205," +
                "237434," +
                "246020," +
                "237533," +
                "249819," +
                "229511," +
                "234580," +
                "239900," +
                "261799," +
                "238025," +
                "234610," +
                "234397," +
                "239968," +
                "234785," +
                "246033," +
                "234680," +
                "246795," +
                "234828," +
                "238213," +
                "261741," +
                "234805," +
                "236805," +
                "237530," +
                "234875," +
                "211820," +
                "237280," +
                "229719," +
                "239792," +
                "237987," +
                "229220," +
                "237168," +
                "234837," +
                "249713," +
                "234830," +
                "234799," +
                "234852," +
                "237445," +
                "261900," +
                "229311," +
                "234662," +
                "234658," +
                "264260," +
                "237850," +
                "234749," +
                "237420," +
                "234997," +
                "237336," +
                "237381," +
                "234961," +
                "234873," +
                "239789," +
                "237444," +
                "234856," +
                "234735," +
                "238145," +
                "231022," +
                "237372," +
                "229749," +
                "234439," +
                "238048," +
                "234431," +
                "261166," +
                "234590," +
                "234839," +
                "237341," +
                "237421," +
                "234653," +
                "237369," +
                "237392," +
                "234931," +
                "237229," +
                "234635," +
                "237221," +
                "238021," +
                "232146," +
                "234612," +
                "234633," +
                "234770," +
                "229037," +
                "235002," +
                "229150," +
                "231103," +
                "206728," +
                "208068," +
                "239868," +
                "206385," +
                "207543," +
                "208611," +
                "207590," +
                "282495," +
                "206358," +
                "282510," +
                "275315," +
                "275618," +
                "282740," +
                "257004," +
                "275612," +
                "275517," +
                "276660," +
                "276598," +
                "275590," +
                "276728," +
                "239342," +
                "205553," +
                "205407," +
                "243170," +
                "207045," +
                "238129," +
                "282666," +
                "282496," +
                "206123," +
                "297316," +
                "275409," +
                "234614," +
                "234359," +
                "238252," +
                "234737," +
                "237377," +
                "237848," +
                "234626," +
                "282811," +
                "242783," +
                "207176," +
                "270224," +
                "282667," +
                "205441," +
                "207001," +
                "206455," +
                "276577," +
                "275149," +
                "242700," +
                "276639," +
                "242034," +
                "276669," +
                "206260," +
                "240535," +
                "282759," +
                "276661," +
                "275326," +
                "275522," +
                "275557," +
                "275390," +
                "272496," +
                "252919," +
                "268851," +
                "206787," +
                "206905," +
                "240603," +
                "275479," +
                "275391," +
                "275352," +
                "282876," +
                "269159," +
                "269165," +
                "267328," +
                "268251," +
                "268933," +
                "268229," +
                "268301," +
                "267195," +
                "268715," +
                "268860," +
                "267351," +
                "268750," +
                "267286," +
                "268663," +
                "268647," +
                "268077," +
                "268817," +
                "269110," +
                "268807," +
                "267251," +
                "268359," +
                "268732," +
                "268321," +
                "267216," +
                "267185," +
                "268131," +
                "267110," +
                "267092," +
                "276540," +
                "276541," +
                "276542," +
                "276544," +
                "276549," +
                "276556," +
                "276559," +
                "276563," +
                "276567," +
                "276574," +
                "276593," +
                "276606," +
                "276609," +
                "276616," +
                "276618," +
                "276623," +
                "276625," +
                "276631," +
                "276634," +
                "276638," +
                "276642," +
                "276649," +
                "276652," +
                "276655," +
                "276664," +
                "276665," +
                "276668," +
                "276670," +
                "276675," +
                "276696," +
                "276698," +
                "276721," +
                "276745," +
                "276742," +
                "276750," +
                "276758," +
                "276768," +
                "276782," +
                "276789," +
                "276792," +
                "276793," +
                "276794," +
                "276796," +
                "276799," +
                "276802," +
                "276809," +
                "276814," +
                "276815," +
                "276819," +
                "276825," +
                "276828," +
                "276829," +
                "276832," +
                "276835," +
                "276837," +
                "276841," +
                "276850," +
                "276851," +
                "276855," +
                "276860," +
                "276865," +
                "276872," +
                "276871," +
                "276873," +
                "276875," +
                "276876," +
                "276879," +
                "276884," +
                "276886," +
                "276892," +
                "276943," +
                "276949," +
                "276959," +
                "276962," +
                "276965," +
                "276971," +
                "276975," +
                "276990," +
                "228917," +
                "206107," +
                "234623," +
                "244543," +
                "244546," +
                "244561," +
                "244562," +
                "244564," +
                "244565," +
                "244567," +
                "244568," +
                "244575," +
                "244579," +
                "244581," +
                "244582," +
                "244590," +
                "244594," +
                "244597," +
                "244602," +
                "244604," +
                "244605," +
                "244607," +
                "244610," +
                "244611," +
                "244612," +
                "244616," +
                "244618," +
                "244625," +
                "244636," +
                "244638," +
                "244642," +
                "244643," +
                "244647," +
                "244650," +
                "244657," +
                "244673," +
                "244675," +
                "244676," +
                "244682," +
                "244683," +
                "244691," +
                "244697," +
                "245893," +
                "245910," +
                "245930," +
                "245947," +
                "245976," +
                "245993," +
                "245997," +
                "246030," +
                "246034," +
                "246674," +
                "246680," +
                "246682," +
                "246763," +
                "276228," +
                "276238," +
                "276245," +
                "276265," +
                "276271," +
                "276290," +
                "276296," +
                "276307," +
                "276322," +
                "276328," +
                "276332," +
                "276341," +
                "276352," +
                "276362," +
                "276364," +
                "276370," +
                "276381," +
                "276385," +
                "276390," +
                "276412," +
                "276414," +
                "276418," +
                "276427," +
                "276433," +
                "276438," +
                "276441," +
                "276442," +
                "276444," +
                "276448," +
                "276449," +
                "276452," +
                "276454," +
                "276458," +
                "276462," +
                "276464," +
                "276470," +
                "276472," +
                "276474," +
                "276476," +
                "276479," +
                "276483," +
                "276494," +
                "276497," +
                "276498," +
                "276511," +
                "276521," +
                "276529," +
                "276534," +
                "276538," +
                "222354";
        String[] idArr = ids.split(",");

        for (String idStr : idArr) {
            long id = Long.parseLong(idStr);
            User user = new User();
            user.setId(id);
            user.setStatus(1);
            user.setToken("fsdfsdfsfsdfsdgsdgsdgsgwggs");
            // 更新用户状态
            userMapper.updateByPrimaryKeySelective(user);
            // 删除redis中的用户数据
            securityService.clearToken(id);
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("userId",id);
            jsonObject.put("verification_token", "239tNGUIJA@&#(nkgj93HFKUW9jfewtewnbu83w98FNSNUEIFCGDSOWEOEIW23N,|GFNDSLOJG");
            String result = OKHttpUtil.httpPostJson(imUri + "user/blockByAdmin", jsonObject.toJSONString());        // 删除融云中用户数据
            String result2= OKHttpUtil.httpPostJson(apiUri + "api/user/blockByAdmin", jsonObject.toJSONString());        // 删除融云中用户数据
        }


    }


    /**
     * 用户删除功能
     * @param id
     * @return
     */
    @RequestMapping("/clean/login/status")
    @ResponseBody
    public FsResponse cleanToken(Long id) {
        securityService.clearToken(id);
        userService.deleteUser(id);
        // 删除融云中的用户信息
        this.blockRongYunUser(id);
        return FsResponseGen.success();
    }


    public static String hexSHA1(String value) {
        try {
            MessageDigest md = MessageDigest.getInstance("SHA-1");
            md.update(value.getBytes("utf-8"));
            byte[] digest = md.digest();
            return byteToHexString(digest);
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }


    }
    public static String byteToHexString(byte[] bytes) {
        return String.valueOf(Hex.encodeHex(bytes));
    }

    /**
     * 修改登录密码
     * @param userId
     * @param password
     * @return
     */
    @RequestMapping("/password/change")
    @ResponseBody
    public FsResponse passwordChange(Long userId, String password) {

        User user = userService.selectById(userId);
        if (null == user) {
            return FsResponseGen.failMsg("用户不存在，userId: " + userId);
        }

        // 融云设置token作废
        userService.expireRongYunUserToken(userId);
        boolean isSuccess = userService.updatePasswordToIm(user, password);



//        RcUsers users = new RcUsers();
//        users.setId(userId.intValue());
//
//        //新密码hash,修改user表密码字段
//        int salt = GeneralUtils.randomInt(1000, 9999);
//        String hashStr = DigestUtils.sha1Hex(password + "|" + salt);
//
//        users.setPasswordhash(hashStr);
//        users.setPasswordsalt(String.valueOf(salt));
//        users.setUpdatedat(new Date());
//
//        rcUsersMapper.updateByPrimaryKeySelective(users);
//        userService.updatePassword(userId, password);

        // 更新api中user的token为空
        User updateUser = new User();
        updateUser.setId(userId);
        updateUser.setToken("");
        userService.update(updateUser);
        return true ? FsResponseGen.success() : FsResponseGen.fail();
    }

    /**
     * 编辑用户信息
     * @param userId
     * @param remark
     * @return
     */
    @RequestMapping("/edit")
    @ResponseBody
    public FsResponse editUser(Long userId, String remark, String recommendCode, Integer integral) {

        User user = userService.selectById(userId);
        if (null == user) {
            return FsResponseGen.failMsg("用户不存在，userId: " + userId);
        }

        User updateUser = new User();
        updateUser.setId(userId);
        updateUser.setRemark(remark);
        updateUser.setRecommendCode(recommendCode);
        // 更新上级邀请码时需要更新体现审核表中的上级邀请码
        if (StringUtils.isNotBlank(recommendCode)) {
            userWithdrawMapper.updateParentCodeByUserId(userId, recommendCode);
        }
        updateUser.setIntegral(integral);
        return FsResponseGen.successData(userService.updateUser(updateUser));
    }

    /**
     * 修改支付密码
     * @param userId
     * @param password
     * @return
     */
    @RequestMapping("/password/pay/change")
    @ResponseBody
    public FsResponse payPasswordChange(Long userId, String password) {
        Contracts.assertTrue(userService.validStatus(userId), "未实名认证");
        balanceService.updatePassword(userId, password);
        securityService.clearToken(userId);
        return FsResponseGen.success();
    }

    /**
     * 设置用户实名
     * @param userId
     * @return
     */
    @RequestMapping("/valid/status")
    @ResponseBody
    public FsResponse setValidStatus(Long userId, String realName, String idNumber) {
        User userUpdate = new User();
        userUpdate.setId(userId);
        userUpdate.setRealStatus(1);
        String realNameUpdate = StringUtils.isNotBlank(realName) ? realName : Long.toString(userId);
        userUpdate.setRealName(realNameUpdate);
        String idNumberUpdate = StringUtils.isNotBlank(idNumber) ? idNumber : Long.toString(userId);
        userUpdate.setIdNumber(idNumberUpdate);
        userService.update(userUpdate);
        return FsResponseGen.success();
    }

    @RequestMapping("/group/auth")
    @ResponseBody
    public FsResponse groupAuth(Long userId, Integer status) {
        User user = new User();
        user.setId(userId);
        user.setCreateGroupAuth(status);
        userMapper.updateByPrimaryKeySelective(user);
        return FsResponseGen.success();
    }


    @RequestMapping("/group/auth/all")
    @ResponseBody
    public FsResponse groupAuthAll() {
        userApiMapper.updateGroupAuth(1, 0);
        return FsResponseGen.success();
    }

    @RequestMapping("/group/auth/none")
    @ResponseBody
    public FsResponse groupAuth() {
        userApiMapper.updateGroupAuth(0, 1);
        return FsResponseGen.success();
    }

    /**
     * 批量注册
     * @param user
     * @return
     */
    @RequestMapping("save")
    @ResponseBody
    public FsResponse save(User user) {

        Contracts.assertTrue(Objects.isNull(userService.selectByMobile(user.getMobile())), "手机号已存在");

        userService.add(user);

        return FsResponseGen.success();
    }


    /**
     * 好友列表
     * @param id
     * @return
     */
    @RequestMapping("friend/index")
    public String friendIndex(Long id) {
        getRequest().setAttribute("id", id);
        return "member/list/friend";
    }

    @RequestMapping("/friend/list")
    @ResponseBody
    public FsResponse friendList(Integer page, Integer limit, Long id) {

        PageHelper.startPage(page, limit);
        return friendService.selectList(page, limit, id);
    }

    @RequestMapping("/ip/index")

    public String ipIndex(Integer page, Integer limit, Long id) {


        return "member/ip/index";
    }

    @RequestMapping("/ip/list")
    @ResponseBody
    public FsResponse ipList(Integer page, Integer limit, String ip) {

        Example example = new Example(AppConfig.class);
        example.createCriteria().andEqualTo("type", AppConfigType.freeze_ip.getVal());
        PageHelper.startPage(page, limit);
        return DtoChangeUtils.getPageList(appConfigMapper.selectByExample(example), v -> {
            IpDto dto = new IpDto();
            dto.setIp(v.getMemo());
            Example ex = new Example(UserIp.class);
            ex.createCriteria().andEqualTo("ip", v.getMemo());
            dto.setUserIds(DtoChangeUtils.getList(userIpMapper.selectByExample(ex), c -> {
                return String.valueOf(c.getUserId());
            }).stream().collect(Collectors.joining(" ")));
            dto.setCtime(v.getCtime());
            return dto;
        });
    }

    @RequestMapping("/ip/add")
    @ResponseBody
    public FsResponse ipAdd(String ip) {

        appConfigService.freezeIp(ip);
        return FsResponseGen.success();
    }

    @RequestMapping("/ip/cancle")
    @ResponseBody
    public FsResponse ipcancle(String ip) {

        appConfigService.unfreezeIp(ip);
        return FsResponseGen.success();
    }




    /**
     * 封禁融云中的用户信息
     * @param id
     */
    private void blockRongYunUser(Long id) {
        try {
            Map<String,String> headers=new HashMap<>();
            headers.put("App-Key", RONGCLOUD_KEY);
            String timestam=String.valueOf(System.currentTimeMillis());

            headers.put("Nonce",timestam);
            headers.put("Timestamp",timestam);
            headers.put("Signature",hexSHA1(RONGCLOUD_SECRET + timestam+timestam));
            Map<String,String> bodys=new HashMap<>();
            bodys.put("userId",N3d.encode(id));
            bodys.put("minute","43200");
            HttpResponse response = null;
            response = HttpUtils.doPost("https://api-cn.ronghub.com/user/block.json", null, null,
                    headers,null, bodys);
            System.out.println(response.getStatusLine().getStatusCode());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * 解封融云中的用户信息
     * @param id
     */
    private Integer unblockRongYunUser(Long id) {
        try {
            Map<String,String> headers=new HashMap<>();
            headers.put("App-Key", RONGCLOUD_KEY);
            String timestam=String.valueOf(System.currentTimeMillis());

            headers.put("Nonce",timestam);
            headers.put("Timestamp",timestam);
            headers.put("Signature",hexSHA1(RONGCLOUD_SECRET + timestam+timestam));
            Map<String,String> bodys=new HashMap<>();
            bodys.put("userId",N3d.encode(id));
            HttpResponse response = HttpUtils.doPost("https://api-cn.ronghub.com/user/unblock.json", null, null,
                    headers,null, bodys);
            return response.getStatusLine().getStatusCode();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    // IP转地区
    private String ipToArea(String ip){
        // 判断ip类型是否是IPV6
        boolean iPv4Address = IPV6ToRegionConverter.isIPv4Address(ip);
        if (iPv4Address) {
            if(!"0:0:0:0:0:0:0:1".equals(ip)) {
                try {
                    // IP转地区
                    String area = searcher.search(ip);
                    return area;
                } catch (Exception e) {
                    log.info("获取IP失败！" + e.getMessage());
                }
            }
        }
        else {
            // 先去数据库查是否已经有对应的地区
//            IPV6ToRegion region = ipv6ToRegionMapper.selectRegionByIp(ip);
//            if (null == region) {
//                IPV6Dto ipv6Dto = ipv6ToRegionConverter.queryAreaByIPV6(ip);
//                if (ipv6Dto.getCode() == 200) {
//                    IPInfo data = ipv6Dto.getData();
//                    IPInfo.Result result = data.getResult();
//                    // 存数据库中以便下次直接使用
//                    IPV6ToRegion toRegion = new IPV6ToRegion();
//                    toRegion.setIp(ip);
//                    toRegion.setCity(result.getCity());
//                    toRegion.setCountry(result.getCountry());
//                    toRegion.setProvince(result.getProvince());
//                    toRegion.setIsp(result.getIsp());
//                    ipv6ToRegionMapper.insert(toRegion);
//
//                    String area = result.getCountry() + "|" + result.getProvince() + "|" + result.getCity();
//                    return area;
//                }
//            }else {
//                String area = region.getCountry() + "|" + region.getProvince() + "|" + region.getCity();
//                return area;
//            }
return "ipv6地址不支持解析";
        }
        return "";
    }

}
